d28b6868f5
Now the volume mount script would be created with correct newlines. Also, this change contain some additional debugging information, so the process of creating and mounting the volume logged to the instance /var/log/messages through syslog. Also, this commit contain the the workaround for the AuthenticationException because the Cirros image starts ssh servece just before the cloud-init and in some cases we need to wait when the instance_initial_scenario canges the password for the cirros user. Change-Id: Icb981c90a5ed8beb75fa119158161bf5ea3e5900 Closes-Bug: #1588808 Signed-off-by: Maksim Malchuk <mmalchuk@mirantis.com>
11 lines
398 B
Bash
11 lines
398 B
Bash
#!/bin/sh
|
|
|
|
echo "Creating test file"
|
|
touch /home/test_file
|
|
|
|
echo "Creating volume mount script on instance"
|
|
echo -e '#!/bin/sh\nsudo /usr/sbin/mkfs.ext4 /dev/vdb | logger -t mount_volume.sh\nsudo mount -t ext4 /dev/vdb /mnt | logger -t mount_volume.sh\nmount | grep /mnt | logger -t mount_volume.sh' | tee /home/mount_volume.sh
|
|
chmod 777 /home/mount_volume.sh
|
|
|
|
echo -e "test\ntest" | passwd cirros
|