Force a tty for sudo in get-occ-config.sh
authorJames Slagle <jslagle@redhat.com>
Tue, 26 Jul 2016 11:41:00 +0000 (07:41 -0400)
committerJames Slagle <jslagle@redhat.com>
Tue, 26 Jul 2016 11:41:00 +0000 (07:41 -0400)
This script will sometimes fail with "you must have a tty to run sudo"
depending on how it was executed. Add -tt to the $SSH_OPTIONS to always
force a tty.

Change-Id: Ic1144b9ba90d4af35db826a78e637da965569841
Closes-Bug: #1606544

deployed-server/scripts/get-occ-config.sh

index b4cedea..2c01174 100755 (executable)
@@ -10,7 +10,7 @@ BLOCKSTORAGE_HOSTS=${BLOCKSTORAGE_HOSTS:-""}
 OBJECTSTORAGE_HOSTS=${OBJECTSTORAGE_HOSTS:-""}
 CEPHSTORAGE_HOSTS=${CEPHSTORAGE_HOSTS:-""}
 SUBNODES_SSH_KEY=${SUBNODES_SSH_KEY:-"~/.ssh/id_rsa"}
-SSH_OPTIONS="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32"
+SSH_OPTIONS="-tt -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Verbose -o PasswordAuthentication=no -o ConnectionAttempts=32"
 
 read -a Controller_hosts_a <<< $CONTROLLER_HOSTS
 read -a Compute_hosts_a <<< $COMPUTE_HOSTS