← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1815990] [NEW] Failure with OpenStack datasource on bare metal servers

 

Public bug reported:

I am booting Ubuntu 18.04 (so, cloud-init 18.4-0ubuntu1~18.04.1) on an
OpenStack managed bare metal server.  In order to activate the OpenStack
data source, I have set an explicit data source on the kernel command
line:

  # cat /proc/cmdline
  BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=3efc28cb-98a4-458d-8fbe-a895461703ca ro rd.iscsi.firmware=1 ci.ds=OpenStack console=tty1 console=ttyS0

ds-identify has correctly activated the OpenStack data source:

  # tail -2 /run/cloud-init/ds-identity.log
  datasource 'OpenStack' specified.
  [up 45.23s] returning 0

The data source is in fact available:

	# curl http://169.254.169.254/openstack/latest/
	meta_data.json
	password
	vendor_data.json
	network_data.json

But cloud-init seems unable to find it:

  __init__.py[DEBUG]: Looking for data source in: ['OpenStack', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
  __init__.py[DEBUG]: Searching for network data source in: ['DataSourceOpenStack', 'DataSourceNone']
  handlers.py[DEBUG]: start: init-network/search-OpenStack: searching for network data from DataSourceOpenStack
  __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'>
  __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
  .
  .
  .
  handlers.py[DEBUG]: finish: init-network/search-OpenStack: SUCCESS: no network data found from DataSourceOpenStack.

This is because the `detect_openstack` method in
`DataSourceOpenStack.py` performs the same dmi-based checks that were
already performed by `ds-identify`...so even though the data source has
been *explicitly selected* it still won't run.

In the same environment, cloud-init-18.2-1.el7.centos.1.x86_64 on CentOS
7 seems to work without a problem.  It looks like that version of cloud-
init does not have the `detect_openstack` method.

** Affects: cloud-init
     Importance: Undecided
         Status: New

** Description changed:

  I am booting Ubuntu 18.04 (so, cloud-init 18.4-0ubuntu1~18.04.1) on an
  OpenStack managed bare metal server.  In order to activate the OpenStack
  data source, I have set an explicit data source on the kernel command
  line:
  
-   # cat /proc/cmdline
-   BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=3efc28cb-98a4-458d-8fbe-a895461703ca ro rd.iscsi.firmware=1 ci.ds=OpenStack console=tty1 console=ttyS0
+   # cat /proc/cmdline
+   BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=3efc28cb-98a4-458d-8fbe-a895461703ca ro rd.iscsi.firmware=1 ci.ds=OpenStack console=tty1 console=ttyS0
  
- ds-identify has corrected activated the OpenStack data source:
+ ds-identify has correctly activated the OpenStack data source:
  
-   # tail -2 /run/cloud-init/ds-identity.log
-   datasource 'OpenStack' specified.
-   [up 45.23s] returning 0
+   # tail -2 /run/cloud-init/ds-identity.log
+   datasource 'OpenStack' specified.
+   [up 45.23s] returning 0
  
  The data source is in fact available:
  
-   # curl http://169.254.169.254/latest/meta-data
-   ami-id
-   ami-launch-index
-   ami-manifest-path
-   block-device-mapping/
-   hostname
-   instance-action
-   instance-id
-   instance-type
-   local-hostname
-   local-ipv4
-   placement/
-   public-hostname
-   public-ipv4
-   public-keys/
-   reservation-id
+   # curl http://169.254.169.254/latest/meta-data
+   ami-id
+   ami-launch-index
+   ami-manifest-path
+   block-device-mapping/
+   hostname
+   instance-action
+   instance-id
+   instance-type
+   local-hostname
+   local-ipv4
+   placement/
+   public-hostname
+   public-ipv4
+   public-keys/
+   reservation-id
  
  But cloud-init seems unable to find it:
  
-   __init__.py[DEBUG]: Looking for data source in: ['OpenStack', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
-   __init__.py[DEBUG]: Searching for network data source in: ['DataSourceOpenStack', 'DataSourceNone']
-   handlers.py[DEBUG]: start: init-network/search-OpenStack: searching for network data from DataSourceOpenStack
-   __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'>
-   __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
-   .
-   .
-   .
-   handlers.py[DEBUG]: finish: init-network/search-OpenStack: SUCCESS: no network data found from DataSourceOpenStack.
+   __init__.py[DEBUG]: Looking for data source in: ['OpenStack', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
+   __init__.py[DEBUG]: Searching for network data source in: ['DataSourceOpenStack', 'DataSourceNone']
+   handlers.py[DEBUG]: start: init-network/search-OpenStack: searching for network data from DataSourceOpenStack
+   __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'>
+   __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
+   .
+   .
+   .
+   handlers.py[DEBUG]: finish: init-network/search-OpenStack: SUCCESS: no network data found from DataSourceOpenStack.
  
  This is because the `detect_openstack` method in
  `DataSourceOpenStack.py` performs the same dmi-based checks that were
  already performed by `ds-identify`...so even though the data source has
  been *explicitly selected* it still won't run.
  
  In the same environment, cloud-init-18.2-1.el7.centos.1.x86_64 on CentOS
  7 seems to work without a problem.  It looks like that version of cloud-
  init does not have the `detect_openstack` method.

** Description changed:

  I am booting Ubuntu 18.04 (so, cloud-init 18.4-0ubuntu1~18.04.1) on an
  OpenStack managed bare metal server.  In order to activate the OpenStack
  data source, I have set an explicit data source on the kernel command
  line:
  
    # cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=3efc28cb-98a4-458d-8fbe-a895461703ca ro rd.iscsi.firmware=1 ci.ds=OpenStack console=tty1 console=ttyS0
  
  ds-identify has correctly activated the OpenStack data source:
  
    # tail -2 /run/cloud-init/ds-identity.log
    datasource 'OpenStack' specified.
    [up 45.23s] returning 0
  
  The data source is in fact available:
  
-   # curl http://169.254.169.254/latest/meta-data
-   ami-id
-   ami-launch-index
-   ami-manifest-path
-   block-device-mapping/
-   hostname
-   instance-action
-   instance-id
-   instance-type
-   local-hostname
-   local-ipv4
-   placement/
-   public-hostname
-   public-ipv4
-   public-keys/
-   reservation-id
+ 	# curl http://169.254.169.254/openstack/latest/
+ 	meta_data.json
+ 	password
+ 	vendor_data.json
+ 	network_data.json
  
  But cloud-init seems unable to find it:
  
    __init__.py[DEBUG]: Looking for data source in: ['OpenStack', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
    __init__.py[DEBUG]: Searching for network data source in: ['DataSourceOpenStack', 'DataSourceNone']
    handlers.py[DEBUG]: start: init-network/search-OpenStack: searching for network data from DataSourceOpenStack
    __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'>
    __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
    .
    .
    .
    handlers.py[DEBUG]: finish: init-network/search-OpenStack: SUCCESS: no network data found from DataSourceOpenStack.
  
  This is because the `detect_openstack` method in
  `DataSourceOpenStack.py` performs the same dmi-based checks that were
  already performed by `ds-identify`...so even though the data source has
  been *explicitly selected* it still won't run.
  
  In the same environment, cloud-init-18.2-1.el7.centos.1.x86_64 on CentOS
  7 seems to work without a problem.  It looks like that version of cloud-
  init does not have the `detect_openstack` method.

-- 
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/1815990

Title:
  Failure with OpenStack datasource on bare metal servers

Status in cloud-init:
  New

Bug description:
  I am booting Ubuntu 18.04 (so, cloud-init 18.4-0ubuntu1~18.04.1) on an
  OpenStack managed bare metal server.  In order to activate the
  OpenStack data source, I have set an explicit data source on the
  kernel command line:

    # cat /proc/cmdline
    BOOT_IMAGE=/boot/vmlinuz-4.15.0-45-generic root=UUID=3efc28cb-98a4-458d-8fbe-a895461703ca ro rd.iscsi.firmware=1 ci.ds=OpenStack console=tty1 console=ttyS0

  ds-identify has correctly activated the OpenStack data source:

    # tail -2 /run/cloud-init/ds-identity.log
    datasource 'OpenStack' specified.
    [up 45.23s] returning 0

  The data source is in fact available:

  	# curl http://169.254.169.254/openstack/latest/
  	meta_data.json
  	password
  	vendor_data.json
  	network_data.json

  But cloud-init seems unable to find it:

    __init__.py[DEBUG]: Looking for data source in: ['OpenStack', 'None'], via packages ['', 'cloudinit.sources'] that matches dependencies ['FILESYSTEM', 'NETWORK']
    __init__.py[DEBUG]: Searching for network data source in: ['DataSourceOpenStack', 'DataSourceNone']
    handlers.py[DEBUG]: start: init-network/search-OpenStack: searching for network data from DataSourceOpenStack
    __init__.py[DEBUG]: Seeing if we can get any data from <class 'cloudinit.sources.DataSourceOpenStack.DataSourceOpenStack'>
    __init__.py[DEBUG]: Update datasource metadata and network config due to events: New instance first boot
    .
    .
    .
    handlers.py[DEBUG]: finish: init-network/search-OpenStack: SUCCESS: no network data found from DataSourceOpenStack.

  This is because the `detect_openstack` method in
  `DataSourceOpenStack.py` performs the same dmi-based checks that were
  already performed by `ds-identify`...so even though the data source
  has been *explicitly selected* it still won't run.

  In the same environment, cloud-init-18.2-1.el7.centos.1.x86_64 on
  CentOS 7 seems to work without a problem.  It looks like that version
  of cloud-init does not have the `detect_openstack` method.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1815990/+subscriptions


Follow ups