New Question
0

Nano server won't get metadata from configdrive

asked 2017-04-12 09:53:14 +0200

devc0x gravatar image

updated 2017-04-12 09:58:57 +0200

Hi, I have built a Nano server using cloudbase-init-offline-install and used that image in Ironic (Bifrost).

.\NewNanoServerImage.ps1 -IsoPath $isoPath -TargetPath $targetPath -AdministratorPassword $password -Platform "BareMetal" -Compute -Clustering -AddCloudbaseinit

The newly populated server don't get the metadata from configdrive. I have set the networking manually and used PowerShell to connect to the server. I see there is a Cloudbase-Init folder and all it's content, but: 1. Get-PSDrive don't show any extra partition with meta-data 2. Get-Service don't show any service related to cloudbase-init 3. C:\Cloudbase-init\logs are empty (never run?)

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2017-04-12 14:56:34 +0200

avladu gravatar image

Hello,

For the moment, can you try generating the image with .\NewNanoServerImage.ps1 -IsoPath $isoPath -TargetPath $targetPath -AdministratorPassword $password -Platform "BareMetal" -Compute -Clustering -AddCloudbaseinit -CloudbaseInitCOMPort $null ?

Thank you,
Adrian vladu

edit flag offensive delete link more
0

answered 2017-04-13 12:35:13 +0200

devc0x gravatar image

updated 2017-04-13 15:28:51 +0200

Now I can see Cloudbase-init execution from logs. Server did get the hostname from configdrive, but no network. Here is the log from cloudbase-init.log https://pastebin.com/raw/LHfSsF38

Here is the configdrive structure:

/media/openstack
/media/openstack/2012-08-10
/media/openstack/2012-08-10/meta_data.json
/media/openstack/content
/media/openstack/latest
/media/openstack/latest/meta_data.json
/media/openstack/latest/network_info.json
/media/openstack/latest/network_data.json

Here is the content of networkinfo.json. networkdata.json is the same as network_info.json

{
"links": [
    {
        "ethernet_mac_address": "0c:c4:7a:8e:0a:c4", 
        "id": "0c:c4:7a:8e:0a:c4", 
        "mtu": "1500", 
        "type": "phy"
    }
], 
"networks": [
    {
        "dns_nameservers": [
            "8.8.8.8"
        ], 
        "id": "ipv4-0c:c4:7a:8e:0a:c4", 
        "ip_address": "10.180.33.3", 
        "link": "0c:c4:7a:8e:0a:c4", 
        "netmask": "255.255.255.192", 
        "routes": [
            {
                "gateway": "10.180.33.1", 
                "netmask": "0.0.0.0", 
                "network": "0.0.0.0"
            }
        ], 
        "type": "ipv4"
    }
], 
"services": [
    {
        "address": "8.8.8.8", 
        "type": "dns"
    }
]

}

edit flag offensive delete link more

Comments

Make sure your environment is clean, as per the cloudbase-init log you provided, cloudbase-init already ran: Plugin 'NetworkConfigPlugin' execution already done, skipping To cleanup the environment, you can run from powershell: Remove-Item -Recurse "'HKLM:\SOFTWARE\Cloudbase Solutions\'"

avladu gravatar imageavladu ( 2017-04-19 16:26:14 +0200 )edit

I have done many clean installation, but nevertheless I could not make the Cloudbase-init to read network_data.json. Here is the log output from another "clean" run - https://pastebin.com/raw/r9EWLzWJ. I see NetworkConfigPlugin executed, read openstack/latest/meta_data.json but no network.

devc0x gravatar imagedevc0x ( 2017-04-19 17:36:58 +0200 )edit

Got it. For the moment, we are working on adding support for the network_data.json file. currently, cloudbase-init supports only the debian like network information. Here is information you need to enable it: https://bugs.launchpad.net/cloudbase-init/+bug/1647394

avladu gravatar imageavladu ( 2017-04-20 14:56:06 +0200 )edit

Hello, Can you try with a non-production version of cloudbase-init zip, where the network_data.json support is implemented? You can use a local cloudbase-init zip path with the -CloudbaseInitZipPath param. I will add the link in the next comment.

avladu gravatar imageavladu ( 2017-04-27 17:34:05 +0200 )edit

https://www.dropbox.com/s/l5aqv4nap5fnwxt/CloudbaseInitSetup_advanced_networking_a87cf19.zip?dl=0

avladu gravatar imageavladu ( 2017-04-27 17:35:59 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-04-12 09:53:14 +0200

Seen: 553 times

Last updated: Apr 13 '17