Apex: Need to use sudo for virsh for fetch creds 77/40877/1
authorTim Rozet <trozet@redhat.com>
Fri, 1 Sep 2017 18:54:14 +0000 (14:54 -0400)
committerTim Rozet <trozet@redhat.com>
Fri, 1 Sep 2017 18:54:14 +0000 (14:54 -0400)
Change-Id: I28e259bf8cdc7431a99227ba3e1eb8615744851e
Signed-off-by: Tim Rozet <trozet@redhat.com>
utils/fetch_os_creds.sh

index 72bebad..0e2a2b9 100755 (executable)
@@ -149,7 +149,7 @@ if [ "$installer_type" == "fuel" ]; then
 
 elif [ "$installer_type" == "apex" ]; then
     if ! ipcalc -c $installer_ip; then
-      installer_ip=$(virsh domifaddr undercloud | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
+      installer_ip=$(sudo virsh domifaddr undercloud | grep -Eo '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}')
       if [ -z "$installer_ip" ] || ! $(ipcalc -c $installer_ip); then
         echo "Unable to find valid IP for Apex undercloud: ${installer_ip}"
         exit 1