yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #73335
[Bug 1752789] Re: init rc script not working properly at first boot
[Expired for cloud-init because there has been no activity for 60 days.]
** Changed in: cloud-init
Status: Incomplete => Expired
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1752789
Title:
init rc script not working properly at first boot
Status in cloud-init:
Expired
Bug description:
Hi, I'm newbie on cloud-init. I used qemu-system-x86_64 using kvm and cloud-init for provisioning ubuntu-cloud-image.
I want to file system mount using 9p file system. If I want to use it, I need to put my path on the qemu starting command like '-fsdev .. something like that' and in the virtual machine, I need to mount using 9p type file system using mount command. So, I choose using ubuntu run-level script which is writing script on the init.d and use update-rc.d command. When I tried to normal script file such as 'touch /blah/blah', it worked properly.
Also, it wrote successfully into file, and execute that script, it
works (which means that it can attach 9p-filesystem, just it does not
work on first time boot).
However, when I tried to attach 9p-file system. It does not working.
When I reboot the instance, it successfully attched the file system.
So, I reasonably consider that cloud-init cannot working properly
before boot. Rest of this issue detail is the detail I follow the
guideline.
Many thanks :)
1. Tell us your cloud provider
-> Ubuntu 16.04 cloud xenial-amd64 img
2. Any appropriate cloud-init configuration you can provide us
Content-Type: multipart/mixed; boundary="==BOUNDARY=="
MIME-Version: 1.0
--==BOUNDARY==
MIME-Version: 1.0
Content-Type: text/cloud-config; charset="us-ascii"
#cloud-config
users:
- root
disable_root: False
chpasswd:
list:
- root:root
expire: False
hostname: 632b7b18
manage_etc_hosts: true
ssh_pwauth: true
write_files:
- path: /etc/init.d/ceph-9p-script-0
content: |
#!/bin/bash
### BEGIN INIT INFO
# Provides: ceph-9p-script-0
# Required-Start: $all
# Required-Stop:
# Default-start: 2 3 5
# Default-stop:
# Short-Description: 9p fileStorage Mount Script
# Description: 9p fileStorage Mount Script
### END INIT INFO
mkdir -p /root/test; mount -t 9p -o trans=virtio,version=9p2000.L
host_share_0 /root/test
- path: /etc/init.d/startscript
content: |
#!/bin/bash
### BEGIN INIT INFO
# Provides: startscript
# Required-Start: $all
# Required-Stop:
# Default-start: 2 3 5
# Default-stop:
# Short-Description: Vm Custom Start Script
# Description: Vm Custom Start Script
### END INIT INFO
timeout 5s /root/start.sh
- path: /root/start.sh
content: |
#!/bin/bash
touch /root/startTest
runcmd:
- /bin/bash -c 'if grep -q 10.0.0.2 /etc/resolv.conf; then :; else echo "nameserver 10.0.0.2" >> /etc/resolv.conf; fi'
- /bin/bash -c 'echo 9p 9pnet 9pnet_virtio >> /etc/initramfs-tools/modules; sudo update-initramfs -u'
- /bin/bash -c 'chmod +x /etc/init.d/ceph-9p-script-0; update-rc.d ceph-9p-script-0 defaults'
merge_type: 'list(append)+dict(recurse_array,no_replace)+str()'
--==BOUNDARY==--
3. Perform the following on the system and attach it to this bug:
Run:
cloud-init collect
If your cloud-init does not have that sub command, then please collect:
dmesg > dmesg.txt
journalctl -o short-precise > journal.txt
tar -cvf cloud-init.tar dmesg.txt journal.txt /var/log/cloud-init.log /var/log/cloud-init-output.log /run/cloud-init
4. attach cloud-init.tar to this bug.
If you feel that there may be sensitive data involved, consider re-creating on a new instance that has no sensitive data.
========
I attached as a file.
I masked some string for sensitive data. But, it does not matter for
watch you log.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1752789/+subscriptions
References