Bug 279876 - nuageinit does not process openstack user-data file
Summary: nuageinit does not process openstack user-data file
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 14.1-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-20 13:18 UTC by Dmitry
Modified: 2024-06-27 09:25 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry 2024-06-20 13:18:16 UTC
Hi!

Freebsd does not process openstack user-data:

Openstack userdata have filename 'user_data'

# ls /media/nuageinit/openstack/latest
meta_data.json          network_data.json       user_data               vendor_data.json        vendor_data2.json

but /usr/libexec/nuageinit try to open 'user-data'

``` 
f = io.open(path.."/user-data")
```
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2024-06-24 11:21:08 UTC
ah, I see, pure openstack have user_data while ec2 or ovhcloud's baremetal have user-data!

I will make nuageinit try both!
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-06-27 08:34:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=cde6642431bb0ca21aeebc7c521e99c681d31ffb

commit cde6642431bb0ca21aeebc7c521e99c681d31ffb
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2024-06-27 08:30:07 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2024-06-27 08:32:14 +0000

    nuageinit: check for both user_data and user-data

    openstack, ec2 and other implementation of cloudinit disagrees on the
    name of the file "user-data" or "user_data", test both and use the first
    found

    PR:     279876

 libexec/nuageinit/nuageinit          | 17 ++++++++++----
 libexec/nuageinit/tests/nuageinit.sh | 44 ++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 4 deletions(-)
Comment 3 Dmitry 2024-06-27 09:25:33 UTC
metadata too:

# ls /media/nuageinit/ec2/latest
meta-data.json  user-data
# ls /media/nuageinit/openstack/latest
meta_data.json          network_data.json       user_data               vendor_data.json        vendor_data2.json