cloud-init behaviour after reboot and growpart

Hi all, After having successfully run cloud-init with the "initial run" box checked, I meet an issue after rebooting the el7 vm. At the boot time, cloud-init waits for a data source that doesn't exist anymore and I have to wait serveral timeouts like this one: open 'http://169.254.169.254/openstack' with {'url': 'http://169.254.169.254/openstack', 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'allow_redirects': True, 'method': 'GET', 'timeout': 10.0} configuration As a workaround, I must include in the initial custom script "touch /etc/cloud/cloud-init.disabled" so as to the vm to boot properly. Now I'd like cloud-init not to be fully disabled because I need it resizes the filesystem after the growpart step. Can anyone help me with this? -- Nathanaël Blanchet Supervision réseau Pôle Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr

Maybe you can try disabling unused data sources. In /etc/cloud/cloud.cfg of el7 vm: datasource_list: ["NoCloud", "ConfigDrive"] If I remember correctly ovirt use ConfigDrive to pass data to VM cloud-init. Hope this helps. Bye, gc Il 23/10/2018 12:37, Nathanaël Blanchet ha scritto:
Hi all,
After having successfully run cloud-init with the "initial run" box checked, I meet an issue after rebooting the el7 vm. At the boot time, cloud-init waits for a data source that doesn't exist anymore and I have to wait serveral timeouts like this one:
open 'http://169.254.169.254/openstack' with {'url': 'http://169.254.169.254/openstack', 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'allow_redirects': True, 'method': 'GET', 'timeout': 10.0} configuration
As a workaround, I must include in the initial custom script "touch /etc/cloud/cloud-init.disabled" so as to the vm to boot properly.
Now I'd like cloud-init not to be fully disabled because I need it resizes the filesystem after the growpart step.
Can anyone help me with this?

Thank you Giulio, it is ok for using local datasource for now, but it seems to be a bug into the default ovirt cloud-init behaviour: at the end of the first provisionning, a first automatic runcmd is passed in the user-data : # cat /var/lib/cloud/instance/user-data.txt ... runcmd: - 'sed -i ' '/^datasource_list: /d' ' /etc/cloud/cloud.cfg; echo ' 'datasource_list: ["NoCloud", "ConfigDrive"]' ' >> /etc/cloud/cloud.cfg' ... But this command is invalid, surely because of the double simple quote ' ' instead of bad double quote ". The result is that no ["NoCloud", "ConfigDrive"] is appended to cloud.cfg. And yes, when adding manually this line, I don't have to disable cloudinit with clout-init.disabled and I can now use growpart and resizefs modules on the second boot. Can anyone confirm a BZ need to be opened? Le 23/10/2018 à 14:41, Giulio Casella a écrit :
Maybe you can try disabling unused data sources. In /etc/cloud/cloud.cfg of el7 vm:
datasource_list: ["NoCloud", "ConfigDrive"]
If I remember correctly ovirt use ConfigDrive to pass data to VM cloud-init.
Hope this helps.
Bye, gc
Il 23/10/2018 12:37, Nathanaël Blanchet ha scritto:
Hi all,
After having successfully run cloud-init with the "initial run" box checked, I meet an issue after rebooting the el7 vm. At the boot time, cloud-init waits for a data source that doesn't exist anymore and I have to wait serveral timeouts like this one:
open 'http://169.254.169.254/openstack' with {'url': 'http://169.254.169.254/openstack', 'headers': {'User-Agent': 'Cloud-Init/0.7.9'}, 'allow_redirects': True, 'method': 'GET', 'timeout': 10.0} configuration
As a workaround, I must include in the initial custom script "touch /etc/cloud/cloud-init.disabled" so as to the vm to boot properly.
Now I'd like cloud-init not to be fully disabled because I need it resizes the filesystem after the growpart step.
Can anyone help me with this?
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/HSXXBXHMO2GQ7F...
-- Nathanaël Blanchet Supervision réseau Pôle Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr

In addition of double quote, there is an extra space between : and / So, the correct runcmd should be: sed -i "/^datasource_list:/d" /etc/cloud/cloud.cfg; echo ''datasource_list:["NoCloud", "ConfigDrive"]'' >> /etc/cloud/cloud.cfg Le 23/10/2018 à 18:43, Nathanaël Blanchet a écrit :
- 'sed -i ' '/^datasource_list: /d' ' /etc/cloud/cloud.cfg; echo ' 'datasource_list: ["NoCloud", "ConfigDrive"]' ' >> /etc/cloud/cloud.cfg'
-- Nathanaël Blanchet Supervision réseau Pôle Infrastrutures Informatiques 227 avenue Professeur-Jean-Louis-Viala 34193 MONTPELLIER CEDEX 5 Tél. 33 (0)4 67 54 84 55 Fax 33 (0)4 67 54 84 14 blanchet@abes.fr
participants (2)
-
Giulio Casella
-
Nathanaël Blanchet