rdo/packstack could not get config-drive properly working. [closed]

asked 2015-03-24 03:26:16 -0600

tonioc gravatar image

Hello,

quite a newbee on openstack, I did an all-in-one rdo installation (icehouse), I'm trying to create and use a custom rhel6 image with config-drive.

  • I created a custom rhel6 image with cloud-init package added (cloud-init-0.7.5-10.el6.centos.2.x86_64)
  • I'm want to pass the network configuration (ifcfg-eth0, ...) and run a script on nova-boot using config-drive, but can't egt it working.

I'm using something like:

 # nova boot --config-drive=true --file /etc/sysconfig/network-scripts/ifcfg-eth0=mypath/ifeth0 --file /etc/sysconfig/network-scripts/route-eth0=mypath/rteth0 --user-data user-data-net-restart.sh  --image myrh6-img --nic port-id=2d68835a-9f3f-4475-999f-d2b0e38bddb8 --flavor m1.small rh6ca-tst2

After the instance is started, I can see the config-drive was actually created, and I can mount it manually and find my files:

# mount /dev/disk/by-label/config-2 /media/cdrom
mount: block device /dev/sr0 is write-protected, mounting read-only
# find /media/cdrom
/media/cdrom
/media/cdrom/ec2
/media/cdrom/ec2/2009-04-04
/media/cdrom/ec2/2009-04-04/meta-data.json
/media/cdrom/ec2/2009-04-04/user-data
/media/cdrom/ec2/latest
/media/cdrom/ec2/latest/meta-data.json
/media/cdrom/ec2/latest/user-data
/media/cdrom/openstack
/media/cdrom/openstack/2012-08-10
/media/cdrom/openstack/2012-08-10/meta_data.json
/media/cdrom/openstack/2012-08-10/user_data
/media/cdrom/openstack/2013-04-04
/media/cdrom/openstack/2013-04-04/meta_data.json
/media/cdrom/openstack/2013-04-04/user_data
/media/cdrom/openstack/2013-10-17
/media/cdrom/openstack/2013-10-17/meta_data.json
/media/cdrom/openstack/2013-10-17/user_data
/media/cdrom/openstack/2013-10-17/vendor_data.json
/media/cdrom/openstack/content
/media/cdrom/openstack/content/0000
/media/cdrom/openstack/content/0001
/media/cdrom/openstack/latest
/media/cdrom/openstack/latest/meta_data.json
/media/cdrom/openstack/latest/user_data
/media/cdrom/openstack/latest/vendor_data.json

and mete-data looks ok:

# cat /media/cdrom/openstack/latest/meta_data.json
{"files": [{"path": "/etc/sysconfig/network-scripts/ifcfg-eth0", "content_path": "/content/0000"}, {"path": "/etc/sysconfig/network-scripts/route-eth0", "content_path": "/content/0001"}], "admin_pass": "QV38k3ybg5vT", "random_seed": "KErKo2rh/R5AYSRUqRNHuHRPSKKoC8KkQcpGd1twyEd9W5wisVtCCOyK/BT/hBMZSG7jXjcVX+JIqLzZp6RsKOpYKsE+IIjBOMmJDD9DPS+y9U/J8sV7gmxu7bmFztWP3M/G+JalhPmYyYbLcApjMnzFMG8NohCVkS87K/CIqz6s4rOInhy2ZucX2E7R1paIzXpWfQG/XlHlCfP2lyxaWLNKg8+ixU1+FviUehPl+fz49nmajFOuwJJ3S2rkCm/KzeEoGYWl6lXNIh43ljp+GNI0+vNuaXVanH8OluZgi/1VS65anlWobRAt7qM4yxnoHLkeDh5k9vADNyX7+SIqntIfOo6frawRlD/OQYiXazhkiRTKXcm0eZjetYL9stDq7SrEZLlMgqp7bzKSHcle3SydkklCP1zf937v7njSWF2DqmvpfqvgkAgdGbhEYfOGnPptROScjzlpFmKqnQtHLo1kjgpeHrPatTamWiFr15vpHx1GQot0Ng6uwtPaxKcMvHwIHalMUrpTnHi5d7d9SAtdt66JCHLhNRtw1bLxvsqQP36NNweYfLFVLwI5uNt4d4oEwFRl/c0M2nKnPN/OHO3T5P1iKv+zYpOOX4pXaRLF23twUh/OI8qmf/ZHS6fWz+jTjjrxNYhCLRsl7yqMEeVqdLeVaLnvA09CabSxeT8=", "uuid": "5c3f3e8f-4c6a-4f1c-a370-2bb45ac26df8", "availability_zone": "nova", "hostname": "rh6ca-tst2.novalocal", "launch_index": 0, "name": "rh6ca-tst2"}[

But files haven't been copied to target locations, and script was not executed.

In /var/log/cloud-init.log (truncated to keep only config-drive related info) :

Mar 12 10:14:42 localhost [CLOUDINIT] importer.py[DEBUG]: Found DataSourceConfigDrive with attributes ['get_datasource_list'] in ['cloudinit.sources.DataSourceConfigDrive']
Mar 12 10:14:43 localhost [CLOUDINIT] __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceConfigDrive.DataSourceConfigDrive'>
Mar 12 10:14:43 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['blkid', '-odevice', '/dev/sr0'] with allowed return codes [0, 2] (shell=False, capture=True)
Mar 12 10:14:43 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['blkid', '-odevice', '/dev/sr1'] with allowed return codes [0, 2] (shell=False, capture=True)
Mar 12 10:14:43 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['blkid', '-tTYPE=vfat', '-odevice'] with allowed return codes [0, 2] (shell=False, capture=True)
Mar 12 10:14:43 localhost [CLOUDINIT] util.py[DEBUG]: Running command ['blkid', '-tTYPE=iso9660', '-odevice'] with allowed ...
(more)
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by rbowen
close date 2016-06-21 13:45:26.793047

Comments

Icehouse is EOL, as per http://releases.openstack.org/ Please reopen if this issue is still relevant in a more recent release.

rbowen gravatar imagerbowen ( 2016-06-21 13:45:20 -0600 )edit