-
Notifications
You must be signed in to change notification settings - Fork 883
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
BSD: add dsidentify to early startup scripts #4182
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is only the first commit of three and already there's lots to comment on here…
e13fd9f
to
c2ccc39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some day…
#!/bin/sh | ||
|
||
# PROVIDE: dsidentify | ||
# REQUIRE: mountcritlocal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once we are correctly using paths.run_dir
/ paths.get_runpath()
in the python code-base, we can start thinking about how to squeeze that into ds-identify itself, and then!, then we can depend on var_run
instead of mountcritlocal
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this would be useful as a comment in the code? If so, we could use a template comment to avoid render it in the output file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
#!/bin/sh | ||
|
||
# PROVIDE: dsidentify | ||
# REQUIRE: mountcritlocal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think this would be useful as a comment in the code? If so, we could use a template comment to avoid render it in the output file.
in canonical#4159, we removed the artifically restricted datasource_list for BSD. This can now lead in some cases to very long boot times. In this patch we add an RC script for ds-identify, similarly to how it's run in systemd's generator stage. Sponsored by: The FreeBSD Foundation
- generalize --option parsing hack in setup.py - extract --prefix from setup.py if it was passed - extend cloudinit.tempalter and tools/render-cloudcfg to take a prefix
and add tests to validate that it works
this allows for easy relocation of LOCALBASE without having patching by porters!
this makes it easy to just remove the rc script in scenarios where Image builders know exactly what cloud they are targetting.
into the code, not just on GitHub.
c2ccc39
to
7d89677
Compare
something very odd is happening when i try to package this:
looks like .rstrip(".tmpl") does more than expected: https://docs.python.org/3/library/stdtypes.html#str.rstrip |
Proposed Commit Message
Additional Context
Partially discussed in #4180
Test Steps
if this patch reduces start-up time, we can count it as successful
Checklist: