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

*: switch systemd & dropin Contents to Resource type #986

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

arithx
Copy link
Contributor

@arithx arithx commented May 18, 2020

Switching the Contents field to the Resource type allows additional
flexibility when specifying unit contents.

This switch comes with the trade-off of no longer being able to
validate unit & dropin contents at validation time.

Closes #884

@arithx
Copy link
Contributor Author

arithx commented May 18, 2020

Code itself isn't tested yet or final, wanted to get this up now to discuss the trade-off (no longer being able to validate unit & dropin contents during validation).

Switching the Contents field to the Resource type allows additional
flexibility when specifying unit contents.
@@ -121,9 +121,23 @@ The Ignition configuration is a JSON document conforming to the following specif
* **_enabled_** (boolean): whether or not the service shall be enabled. When true, the service is enabled. When false, the service is disabled. When omitted, the service is unmodified. In order for this to have any effect, the unit must have an install section.
* **_mask_** (boolean): whether or not the service shall be masked. When true, the service is masked by symlinking it to `/dev/null`.
* **_contents_** (string): the contents of the unit.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/string/object/ I think? Also, isn't this a major schema break?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, yeah. This would require us to move to spec 4.0.0. Arguably that's okay -- the change is still translatable, so we can support both 3.x and 4.0 in the same code -- but we've avoided incompatible changes so far. But it also makes the original use case harder to implement in handwritten configs, since they'd need to convert to data URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec change Requires changes to the spec
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFE: systemd units able to specify contents:source:data like files section
3 participants