Hi Russell, While writing automation scripts for installing nova, I am running $ openstack-nova-db-setup --novapw nova --rootpw "" --yes my problem is this script prompts for a password if the mysql root password is a zero length string. This patch allows the root password to be a zero length string. Any thought? should this change go into the openstack-nova package or is it a bad idea to allow blank passwords? in my case mysql had already been installed with a blank root password before running this script so I had to pass in the blank password. Thanks, Derek.
commit 18ea005bd699d5c1b79ca72c455308ef7f2be9ad Author: Derek Higgins <derekh@xxxxxxxxxx> Date: Fri Jan 20 11:57:47 2012 +0000 Allow an empty string to be used as a mysql root password diff --git a/openstack-nova-db-setup b/openstack-nova-db-setup index 1c5a3a5..86bbeef 100755 --- a/openstack-nova-db-setup +++ b/openstack-nova-db-setup @@ -64,7 +64,6 @@ start_mysql_server() { systemctl start mysqld.service } -MYSQL_ROOT_PW="" MYSQL_NOVA_PW_DEFAULT="nova" MYSQL_NOVA_PW=${MYSQL_NOVA_PW_DEFAULT} NOVA_CONFIG="/etc/nova/nova.conf" @@ -150,7 +149,7 @@ fi if [ $NEW_MYSQL_INSTALL -eq 1 ] then - if [ -z "${MYSQL_ROOT_PW}" ] ; then + if [ ! "${MYSQL_ROOT_PW+defined}" ] ; then echo "Since this is a fresh installation of MySQL, please set a password for the 'root' mysql user." PW_MATCH=0 @@ -175,7 +174,7 @@ then echo "Failed to set password for 'root' MySQL user." exit 1 fi -elif [ -z "${MYSQL_ROOT_PW}" ] ; then +elif [ ! "${MYSQL_ROOT_PW+defined}" ] ; then printf "Please enter the password for the 'root' MySQL user: " read -s MYSQL_ROOT_PW echo @@ -185,7 +184,7 @@ fi # Sanity check MySQL credentials. MYSQL_ROOT_PW_ARG="" -if [ -n "${MYSQL_ROOT_PW}" ] +if [ "${MYSQL_ROOT_PW+defined}" ] then MYSQL_ROOT_PW_ARG="--password=${MYSQL_ROOT_PW}" fi
_______________________________________________ cloud mailing list cloud@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/cloud