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

missing ignition-diskful and ignition-complete targets when building initrd #799

Closed
miabbott opened this issue Jan 4, 2021 · 2 comments · Fixed by #800
Closed

missing ignition-diskful and ignition-complete targets when building initrd #799

miabbott opened this issue Jan 4, 2021 · 2 comments · Fixed by #800

Comments

@miabbott
Copy link
Member

miabbott commented Jan 4, 2021

Saw the following when doing coreos-assembler build; they don't appear to be fatal or even affect operation, but thought I would log the messages anyways

dracut: *** Including module: i18n ***                                                                                                                                                                                                                                                                                        
dracut: *** Including module: coreos-network ***                                                                                                               
Failed to add dependency on unit, unit ignition-diskful.target does not exist.                                                                                                                                                                                                                                                
dracut: *** Including module: live ***                                                                                                                                                                                                                                                                                        
Failed to add dependency on unit, unit ignition-complete.target does not exist.                                                                                
dracut: *** Including module: coreos-udev ***                                                                                                                                                                                                                                                                                 
dracut: *** Including module: afterburn ***      
@jlebon
Copy link
Member

jlebon commented Jan 4, 2021

Ouhh, this is probably fallout from #778, which does sanity-checks before trying to symlink. These modules are numbered lower than 30ignition, which is what actually installs those targets. So systemctl is probably confused by not finding the unit files there.

Offhand, I think we can just bump their numbers to fix this. I need to check if it actually still at least creates a broken symlink (from the error message, that's likely not the case). If not, then we should probably hold the current releases for this. Otherwise, e.g. coreos-copy-firstboot-network.service won't run. We'll need to get it into RHCOS too.

jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jan 4, 2021
Unlike `ln -sf`, `systemctl add-{requires,wants}` wants to verify that
the target and member units all exist. Because we had some dracut
modules which ran earlier than the `30ignition` module, we would lose
the service enablements which hook into e.g. `ignition-complete.target`
and related units.

Let's simply rename our modules so that they're ordered after
`30ignition`. While we're here, let's consistently prefix them by
`coreos-`. So overall, the changes are:
- `30ignition-coreos` -> `35coreos-ignition`
- `20live` -> `35coreos-live`
- `15coreos-network` -> `35coreos-network`

I've verified that there are now no "Failed to add dependency on unit"
error messages at build-time. (The next patch enforces this more
strictly.)

Fixes: coreos#778
Closes: coreos#799
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jan 4, 2021
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
coreos#799 at build time
in the future.
@jlebon
Copy link
Member

jlebon commented Jan 4, 2021

Fix in #800. Some sleuthing shows that #778 went into the last testing release, but not in the last stable release.

jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jan 4, 2021
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
coreos#799 at build time
in the future.
jlebon added a commit that referenced this issue Jan 4, 2021
Unlike `ln -sf`, `systemctl add-{requires,wants}` wants to verify that
the target and member units all exist. Because we had some dracut
modules which ran earlier than the `30ignition` module, we would lose
the service enablements which hook into e.g. `ignition-complete.target`
and related units.

Let's simply rename our modules so that they're ordered after
`30ignition`. While we're here, let's consistently prefix them by
`coreos-`. So overall, the changes are:
- `30ignition-coreos` -> `35coreos-ignition`
- `20live` -> `35coreos-live`
- `15coreos-network` -> `35coreos-network`

I've verified that there are now no "Failed to add dependency on unit"
error messages at build-time. (The next patch enforces this more
strictly.)

Fixes: #778
Closes: #799
jlebon added a commit that referenced this issue Jan 4, 2021
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
#799 at build time
in the future.
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jan 4, 2021
Unlike `ln -sf`, `systemctl add-{requires,wants}` wants to verify that
the target and member units all exist. Because we had some dracut
modules which ran earlier than the `30ignition` module, we would lose
the service enablements which hook into e.g. `ignition-complete.target`
and related units.

Let's simply rename our modules so that they're ordered after
`30ignition`. While we're here, let's consistently prefix them by
`coreos-`. So overall, the changes are:
- `30ignition-coreos` -> `35coreos-ignition`
- `20live` -> `35coreos-live`
- `15coreos-network` -> `35coreos-network`

I've verified that there are now no "Failed to add dependency on unit"
error messages at build-time. (The next patch enforces this more
strictly.)

Fixes: coreos#778
Closes: coreos#799
(cherry picked from commit 94c435f)
jlebon added a commit to jlebon/fedora-coreos-config that referenced this issue Jan 4, 2021
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
coreos#799 at build time
in the future.

(cherry picked from commit bdcebad)
dustymabe pushed a commit that referenced this issue Jan 4, 2021
Unlike `ln -sf`, `systemctl add-{requires,wants}` wants to verify that
the target and member units all exist. Because we had some dracut
modules which ran earlier than the `30ignition` module, we would lose
the service enablements which hook into e.g. `ignition-complete.target`
and related units.

Let's simply rename our modules so that they're ordered after
`30ignition`. While we're here, let's consistently prefix them by
`coreos-`. So overall, the changes are:
- `30ignition-coreos` -> `35coreos-ignition`
- `20live` -> `35coreos-live`
- `15coreos-network` -> `35coreos-network`

I've verified that there are now no "Failed to add dependency on unit"
error messages at build-time. (The next patch enforces this more
strictly.)

Fixes: #778
Closes: #799
(cherry picked from commit 94c435f)
dustymabe pushed a commit that referenced this issue Jan 4, 2021
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
#799 at build time
in the future.

(cherry picked from commit bdcebad)
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this issue Oct 10, 2023
Unlike `ln -sf`, `systemctl add-{requires,wants}` wants to verify that
the target and member units all exist. Because we had some dracut
modules which ran earlier than the `30ignition` module, we would lose
the service enablements which hook into e.g. `ignition-complete.target`
and related units.

Let's simply rename our modules so that they're ordered after
`30ignition`. While we're here, let's consistently prefix them by
`coreos-`. So overall, the changes are:
- `30ignition-coreos` -> `35coreos-ignition`
- `20live` -> `35coreos-live`
- `15coreos-network` -> `35coreos-network`

I've verified that there are now no "Failed to add dependency on unit"
error messages at build-time. (The next patch enforces this more
strictly.)

Fixes: coreos#778
Closes: coreos#799
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this issue Oct 10, 2023
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
coreos#799 at build time
in the future.
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this issue Oct 10, 2023
Unlike `ln -sf`, `systemctl add-{requires,wants}` wants to verify that
the target and member units all exist. Because we had some dracut
modules which ran earlier than the `30ignition` module, we would lose
the service enablements which hook into e.g. `ignition-complete.target`
and related units.

Let's simply rename our modules so that they're ordered after
`30ignition`. While we're here, let's consistently prefix them by
`coreos-`. So overall, the changes are:
- `30ignition-coreos` -> `35coreos-ignition`
- `20live` -> `35coreos-live`
- `15coreos-network` -> `35coreos-network`

I've verified that there are now no "Failed to add dependency on unit"
error messages at build-time. (The next patch enforces this more
strictly.)

Fixes: coreos#778
Closes: coreos#799
HuijingHei pushed a commit to HuijingHei/fedora-coreos-config that referenced this issue Oct 10, 2023
Because dracut directly sources `module-setup.sh` scripts and isn't
compatible with `set -e`, we can't just turn it on in our modules.
Instead, let's just manually add `|| exit 1` in all the calls to
`systemctl add-{requires,wants}` so that we catch regressions like
coreos#799 at build time
in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants