Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong openstack provider #373

Closed
lgogolin opened this issue Mar 7, 2020 · 4 comments
Closed

Wrong openstack provider #373

lgogolin opened this issue Mar 7, 2020 · 4 comments

Comments

@lgogolin
Copy link

lgogolin commented Mar 7, 2020

Bug

Afterburn with --cmdline argument does not work on OpenStack

Operating System Version

fedora-coreos-31.20200210.3.0

Afterburn Version

Afterburn 4.1.3

Environment

OpenStack

Expected Behavior

/usr/bin/afterburn --cmdline--attributes=/run/metadata/afterburn
Mar 07 23:20:33.942 INFO Fetching http://169.254.169.254/latest/meta-data/hostname: Attempt #1
Mar 07 23:20:34.412 INFO Fetch successful
Mar 07 23:20:34.412 INFO Fetching http://169.254.169.254/latest/meta-data/instance-id: Attempt #1
Mar 07 23:20:34.503 INFO Fetch successful
Mar 07 23:20:34.504 INFO Fetching http://169.254.169.254/latest/meta-data/local-ipv4: Attempt #1
Mar 07 23:20:34.592 INFO Fetch successful
Mar 07 23:20:34.592 INFO Fetching http://169.254.169.254/latest/meta-data/public-ipv4: Attempt #1
Mar 07 23:20:34.676 INFO Fetch successful

Actual Behavior

/usr/bin/afterburn --cmdline
Error: fetching metadata from provider
Caused by: unknown provider 'openstack'

Reproduction Steps

cat /proc/cmdline
BOOT_IMAGE=(hd0,gpt1)/ostree/fedora-coreos-19190477fad0e60d605a623b86e06bb92aa318b6b79f78696b06f68f262ad5d6/vmlinuz-5.4.17-200.fc31.x86_64 mitigations=auto,nosmt systemd.unified_cgroup_hierarchy=0 console=tty0 console=ttyS0,115200n8 ignition.firstboot rd.neednet=1 ip=dhcp ostree=/ostree/boot.1/fedora-coreos/19190477fad0e60d605a623b86e06bb92aa318b6b79f78696b06f68f262ad5d6/0 ignition.platform.id=openstack

cloud provider reported by cmdline is openstack. Not openstack-metadata

Other Information

@lucab
Copy link
Contributor

lucab commented Mar 10, 2020

@lgogolin thanks for the report.
While I understand this may be surprising, it is working as expected. In particular, you are hitting #251 (which still need to be part of some proper documentation somewhere).

For your specific case, OpenStack in general does not mandate a metadata-service as the baseline. Thus you can be in either one of these two cases:

  1. your deployment does NOT have a metadata service -> do not run afterburn, it can't fetch/write attributes anyway
  2. your deployment has a metadata service -> write a dropin for afterburn service with Environment=AFTERBURN_OPT_PROVIDER=--provider openstack-metadata

@lgogolin
Copy link
Author

@lucab Yeah, I make it work by injecting parameters and forcing openstack-metdata as provider.

It was more about IMO wrong name for openstack provider hardcoded in the app which makes default approach --cmdline not working out of the box.

If You think this is not a BUG - We can close the issue

@lucab
Copy link
Contributor

lucab commented Mar 10, 2020

was more about IMO wrong name for openstack provider hardcoded in the app which makes default approach --cmdline not working out of the box.

I agree this is a terrible UX, and the bug is that it should be properly documented.

The root of this is that FCOS images can work with or without a metadata endpoint (thus the generic openstack platform ID), but Afterburn cannot (thus the -metadata suffix).

Sorry again for the pain/friction, I'm going to close this ticket and hopefully sometime soon we will have an end-to-end "Booting FCOS on OpenStack" docpage.

@lucab lucab closed this as completed Mar 10, 2020
@lgogolin
Copy link
Author

I read the issue You mentioned #251 and also issue from openshift as reference.

And to be honest do not understand where is the problem.

You mentioned there that metadata service in OpneStack is optional - true
I just do not see difference in approaches:

--cmdline does not work because ignition.id does not match
Fixed ignition.id but metadata not available - it will also fail on requesting data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants