Darryl L. Pierce
2009-Jun-03 17:56 UTC
[Ovirt-devel] [PATCH node] Checks if storage is setup before setting the admin password. BZ#509339
When the o-c-password script starts, it checks to see if there's a Config logical volume. If there is not one, then it assumes local storage is not configured and exits the script with a warning message. Signed-off-by: Darryl L. Pierce <dpierce at redhat.com> --- scripts/ovirt-config-password | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/scripts/ovirt-config-password b/scripts/ovirt-config-password index 7abfb3b..45b5d8c 100755 --- a/scripts/ovirt-config-password +++ b/scripts/ovirt-config-password @@ -8,6 +8,13 @@ trap '__st=$?; stop_log; exit $__st' 0 trap 'exit $?' 1 2 13 15 +warn() { printf '%s\n' "$*" >&2; } + +if [[ ! "Config" =~ $(lvdisplay -C | awk '{ print $1 }') ]]; then + warn "Local storage must be configured prior to setting the administrator password." + exit 99 +fi + # Usage: set_sasl_password USER # Prompt(twice) for a password for the specified USER. # If they match, set that user's system password, -- 1.6.0.6
Alan Pevec
2009-Jun-04 15:41 UTC
[Ovirt-devel] Re: [PATCH node] Checks if storage is setup before setting the admin password. BZ#509339
Darryl L. Pierce wrote:> When the o-c-password script starts, it checks to see if there's a > Config logical volume. If there is not one, then it assumes local > storage is not configured and exits the script with a warning message.not 100% sure about this one, but considering that standalone mode doesn't make much sense w/o local storage, ACK and pushed with one change:> +if [[ ! "Config" =~ $(lvdisplay -C | awk '{ print $1 }') ]]; then+if ! lvs HostVG/Config >/dev/null 2>&1 ; then
Reasonably Related Threads
- [PATCH node] Hostname is now properly persisted between reboots. rhbz#504166
- [PATCH node] Rerunning network config resets all network config. bz#507393
- [PATCH node] Users can view log files on the node. bz#506289
- [PATCH node] This is a follow-on patch for bz#507455.
- [PATCH node] o-c-config will only run when local storage is configured. rhbz#505560