[node-patches] Change in ovirt-node[master]: add efi storage_vol parameter and fix parsing in newer forma...
jboggs at redhat.com
jboggs at redhat.com
Thu Aug 23 18:15:25 UTC 2012
Joey Boggs has uploaded a new change for review.
Change subject: add efi storage_vol parameter and fix parsing in newer format
......................................................................
add efi storage_vol parameter and fix parsing in newer format
rhbz#831177
Change-Id: I25b1897ffd3f013cabaca00de8c5cf2295454004
Signed-off-by: Joey Boggs <jboggs at redhat.com>
---
M scripts/ovirt-init-functions.sh
M scripts/ovirtnode/storage.py
2 files changed, 8 insertions(+), 5 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/47/7447/1
diff --git a/scripts/ovirt-init-functions.sh b/scripts/ovirt-init-functions.sh
index 0628d27..441edbb 100644
--- a/scripts/ovirt-init-functions.sh
+++ b/scripts/ovirt-init-functions.sh
@@ -466,17 +466,20 @@
storage_vol* | ovirt_vol=*)
i=${i#ovirt_vol=}
i=${i#storage_vol=}
- eval $(printf $i|awk -F: '{ print "lv1="$1; print "lv2="$2; print "lv3="$3; print "lv4="$4; print "lv5="$5; print "lv6="$6; print "lv7="$7; print "lv8="$8; }')
+ eval $(printf $i|awk -F: '{ print "lv1="$1; print "lv2="$2; print "lv3="$3; print "lv4="$4; print "lv5="$5; print "lv6="$6; print "lv7="$7; print "lv8="$8; print "lv9="$9; }')
# Reads each provided LV size and assign them
# NOTE: Boot and Root size are ignored by o-c-storage
- for p in $(seq 1 8); do
+ for p in $(seq 1 9); do
var=lv$p
size=
lv=
if [ -n "${!var}" ]; then
- eval $(printf '${!var}'|awk -F, '{ print "size="$1; print "lv="$2; }')
+ eval $(printf "${!var}"|awk -F, '{ print "size="$1; print "lv="$2; }')
if [ -n "${size}" ]; then
case "${lv}" in
+ EFI)
+ vol_efi_size=$size
+ ;;
Boot)
vol_boot_size=$size
;;
@@ -789,7 +792,7 @@
# save boot parameters as defaults for ovirt-config-*
- params="bootif init init_app vol_boot_size vol_swap_size vol_root_size vol_config_size vol_logging_size vol_data_size vol_swap2_size vol_data2_size crypt_swap crypt_swap2 upgrade standalone overcommit ip_address ip_netmask ip_gateway ipv6 dns ntp vlan ssh_pwauth syslog_server syslog_port collectd_server collectd_port bootparams hostname firstboot rhn_type rhn_url rhn_ca_cert rhn_username rhn_password rhn_profile rhn_activationkey rhn_proxy rhn_proxyuser rhn_proxypassword runtime_mode kdump_nfs iscsi_name snmp_password install netconsole_server netconsole_port stateless cim_enabled wipe_fakeraid iscsi_init iscsi_target_name iscsi_target_host iscsi_target_port iscsi_install"
+ params="bootif init init_app vol_boot_size vol_efi_size vol_swap_size vol_root_size vol_config_size vol_logging_size vol_data_size vol_swap2_size vol_data2_size crypt_swap crypt_swap2 upgrade standalone overcommit ip_address ip_netmask ip_gateway ipv6 dns ntp vlan ssh_pwauth syslog_server syslog_port collectd_server collectd_port bootparams hostname firstboot rhn_type rhn_url rhn_ca_cert rhn_username rhn_password rhn_profile rhn_activationkey rhn_proxy rhn_proxyuser rhn_proxypassword runtime_mode kdump_nfs iscsi_name snmp_password install netconsole_server netconsole_port stateless cim_enabled wipe_fakeraid iscsi_init iscsi_target_name iscsi_target_host iscsi_target_port iscsi_install"
# mount /config unless firstboot is forced
if [ "$firstboot" != "1" ]; then
mount_config
diff --git a/scripts/ovirtnode/storage.py b/scripts/ovirtnode/storage.py
index 374b511..e02db02 100644
--- a/scripts/ovirtnode/storage.py
+++ b/scripts/ovirtnode/storage.py
@@ -115,7 +115,7 @@
for i in ['OVIRT_VOL_BOOT_SIZE', 'OVIRT_VOL_ROOT_SIZE',
'OVIRT_VOL_CONFIG_SIZE', 'OVIRT_VOL_LOGGING_SIZE',
'OVIRT_VOL_DATA_SIZE', 'OVIRT_VOL_SWAP2_SIZE',
- 'OVIRT_VOL_DATA2_SIZE']:
+ 'OVIRT_VOL_DATA2_SIZE', 'OVIRT_VOL_EFI_SIZE']:
i_short = i.replace("OVIRT_VOL_", "")
if i in OVIRT_VARS:
if int(OVIRT_VARS[i]) < int(self.__dict__[i_short]):
--
To view, visit http://gerrit.ovirt.org/7447
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I25b1897ffd3f013cabaca00de8c5cf2295454004
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Joey Boggs <jboggs at redhat.com>
More information about the node-patches
mailing list