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

Move Ignition-Dracut into Ignition #1039

Merged
merged 536 commits into from
Jul 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
536 commits
Select commit Hold shift + click to select a range
127bd66
dracut: fix comment
bgilbert Nov 18, 2017
9495e3b
dracut: copy Ignition base configs into system dir
bgilbert Dec 3, 2017
60d29e0
Merge pull request #135 from bgilbert/external-oem-configs
bgilbert Dec 6, 2017
760986b
dracut: correctly sequence disk-uuid@ before ignition-setup
bgilbert Dec 11, 2017
4d25b96
Merge pull request #136 from bgilbert/before
bgilbert Dec 12, 2017
4df8cff
dracut: ignore Azure SR-IOV VF interface
bgilbert Dec 19, 2017
e8c3ebe
Merge pull request #137 from bgilbert/azure-sriov
bgilbert Dec 26, 2017
1626a8e
update CoC and legalese
ericchiang Jan 4, 2018
daa1e80
Merge pull request #139 from ericchiang/coc
dm0- Jan 4, 2018
4189890
99start-root: drop DEVLINKS from mdadm invocation
Jan 3, 2018
70fcb32
Merge pull request #138 from ajeddeloh/fix-devlinks
ajeddeloh Jan 10, 2018
ca7d8fd
dracut: drop obsolete comment
bgilbert Jan 23, 2018
142e647
Merge pull request #140 from bgilbert/mtu
bgilbert Jan 23, 2018
8771128
remove extra sauce
dustymabe Mar 24, 2018
d3d3121
Hack dracut to just do ignition-files.
dustymabe Mar 24, 2018
863a8f6
Add README that shows people how to use this
dustymabe Mar 27, 2018
fb89798
Make it so we will only run once
dustymabe Mar 27, 2018
61f8967
use /etc/machine-id to detect firstboot
dustymabe Mar 27, 2018
42c1a1b
Revert "use /etc/machine-id to detect firstboot"
dustymabe Mar 27, 2018
4ea7626
Try to fix problem
dustymabe Mar 27, 2018
a9fe234
reset to 863a8f6
dustymabe Mar 27, 2018
6a9118d
module-setup.sh should install the binaries Ignition depends on
Apr 3, 2018
d37b56e
only run Ignition on first boot
Apr 3, 2018
a05ce22
add ignition disks stage
Apr 3, 2018
d403fc8
ignition-quench.clc: add the source for ignition-quench.ign
Apr 6, 2018
03a59a2
Merge pull request #1 from dgonyeo/dusty-fork
dustymabe Apr 6, 2018
b81cd2f
README: Note instructions are for classic systems
cgwalters Jun 1, 2018
9236987
Merge pull request #3 from cgwalters/readme-tweak
dustymabe Jun 5, 2018
0609153
module-setup: order install list alphabetically
dustymabe Jun 1, 2018
7fd35bc
module-setup: update module-setup so deps are pulled in
dustymabe Jun 1, 2018
e001257
For now let's assume ec2 if we are running on xen
dustymabe Jun 4, 2018
65893e7
get rid of usr-generator module
dustymabe Jun 4, 2018
f5bad8c
add back in forwarding journal to console
dustymabe Jun 4, 2018
0c58283
update README
dustymabe Jun 1, 2018
59ebe33
Merge pull request #2 from dustymabe/PR
dustymabe Jun 5, 2018
1f80d41
README.txt: fix rpm-ostree instruction
jlebon Jun 7, 2018
fd31492
Prefix remount-sysroot.service with "ignition-"
jlebon Jun 7, 2018
a071427
Run ignition-files after ostree-prepare-root.service
jlebon Jun 6, 2018
25f2f50
Merge pull request #5 from jlebon/pr/after-ostree
dustymabe Jun 7, 2018
11d0ab5
no disks for now - boot systemd unit ordering issue
dustymabe Jun 6, 2018
7731f33
Merge pull request #6 from dustymabe/check
dustymabe Jun 7, 2018
7b5bbfa
Add ignition-ask-var-mount.service
jlebon Jun 7, 2018
1e36a6c
Merge pull request #7 from jlebon/pr/ask-var-mount
dustymabe Jun 7, 2018
4f985ad
ignition-generator: add hack for openstack support
jlebon Jun 12, 2018
ce6dfe1
Merge pull request #8 from jlebon/pr/openstack-oem-id
dustymabe Jun 13, 2018
7e250dd
Make ignition work on classic systems
jlebon Jun 18, 2018
b041781
Drop 'auto-detect' hacks in generator
jlebon Jun 18, 2018
922ef67
Merge pull request #9 from jlebon/pr/conditional
dustymabe Jun 18, 2018
bf3b454
Merge pull request #10 from jlebon/pr/drop-hacks
dustymabe Jun 18, 2018
9d2dd32
Rework how we run Ignition on first boot
Rahuls0720 Jun 19, 2018
6463f60
fixup! Rework how we run Ignition on first boot
cgwalters Jun 29, 2018
17a201b
Merge pull request #12 from cgwalters/firstboot-2
dustymabe Jun 29, 2018
09f16fd
Add Journald forward to kernel log buffer option
Rahuls0720 Jul 20, 2018
d664657
Merge pull request #13 from Rahuls0720/tty0_dev
dustymabe Jul 21, 2018
495c13c
change the default level of messages send to kmsg
dustymabe Aug 17, 2018
56aa514
Merge pull request #14 from dustymabe/dusty
dustymabe Aug 17, 2018
92ef9dd
coreos-firstboot-complete: RemainAfterExit=yes
cgwalters Aug 28, 2018
2a36c7d
Merge pull request #15 from cgwalters/remain-after-exit
dustymabe Aug 29, 2018
3f41219
dracut/ignition: remove CL-legacy udev references
lucab Sep 3, 2018
d056287
Merge pull request #16 from lucab/ups/ignition-udev-rules
dustymabe Sep 4, 2018
26f2396
journal: Don't log to console AND kmsg
dustymabe Sep 20, 2018
8c85eb3
Merge pull request #19 from dustymabe/dusty
dustymabe Sep 21, 2018
ce9f648
30ignition: add support for ignition-disks
lucab Sep 18, 2018
c09ce6f
Merge pull request #17 from lucab/ups/ignition-disks
dustymabe Sep 25, 2018
6d0763a
module-setup: Make mkfs.btrfs optional
cgwalters Oct 12, 2018
4bdfb34
Merge pull request #21 from cgwalters/btrfs-optional
dustymabe Oct 13, 2018
ecf5779
module-setup.sh: explicitly install qemu_fw_cfg
jlebon Oct 16, 2018
b7d4424
Merge pull request #25 from jlebon/pr/instmods-qemu-fw
dustymabe Oct 16, 2018
a0bc135
ignition-ask-var-mount.service: use RemainAfterExit=yes
jlebon Oct 18, 2018
0301a03
ignition-disks.service: drop Requires=network.target
jlebon Oct 18, 2018
b03d4e2
Merge pull request #27 from jlebon/pr/prep
dustymabe Oct 19, 2018
66335f2
ignition: run files stage at original CL ordering
jlebon Oct 18, 2018
3ec0b39
remove ignition-remount-sysroot.service files
jlebon Oct 18, 2018
7ee64ca
Merge pull request #26 from jlebon/pr/run-earlier
dustymabe Oct 25, 2018
03d8438
30ignition: only instmods if module available
jlebon Oct 25, 2018
decf63f
Merge pull request #28 from jlebon/pr/fw-cfg
dustymabe Oct 25, 2018
6e41a70
Rename `coreos.firstboot` kernel cmdline arg to `ignition.firstboot`
LorbusChris Nov 20, 2018
7b83454
Merge pull request #30 from LorbusChris/master
dustymabe Nov 20, 2018
650d58c
ignition-firstboot-complete.service: Remount /boot rw
cgwalters Dec 26, 2018
996d527
Merge pull request #36 from cgwalters/firstboot-complete-ro-boot
dustymabe Jan 3, 2019
a6551f1
Remount /sysroot rw (#38)
thkukuk Jan 9, 2019
7579b92
journal: add clarifying comment for context
dustymabe Jan 24, 2019
fa7131b
Merge pull request #40 from coreos/dusty
dustymabe Jan 25, 2019
b09aeeb
Add ability to parse config.ign file on boot
Feb 4, 2019
8939597
Replace OEM with boot
Feb 4, 2019
77ba5bf
Always check for boot, needs to exist
Feb 5, 2019
478877e
Remove the check for OEM partition, not used
Feb 5, 2019
9e18211
Merge pull request #42 from yrobla/master
dustymabe Feb 8, 2019
7115ef4
ignition-setup: remove support for default configs
dustymabe Feb 7, 2019
5474018
ignition-setup: support boot or platform base/user configs
dustymabe Feb 7, 2019
a260c4c
generator: RemainAfterExit=yes for ignition-setup
dustymabe Feb 8, 2019
7b2ace1
generator: try to get ignition-setup to run on boot
dustymabe Feb 8, 2019
e1e14dd
dracut: add /usr/sbin/ignition-setup to initramfs
dustymabe Feb 8, 2019
ff7a3de
ignition-setup: mount/unmount boot to grab user.ign
dustymabe Feb 8, 2019
cf1fab8
ignition-setup: changes from code review
dustymabe Feb 8, 2019
f6f32a0
ignition-setup: use MountFlags=slave for systemd unit
dustymabe Feb 14, 2019
71a2b3a
services: fixup unit deps to more match CL
dustymabe Feb 14, 2019
11beae9
ignition-setup: rename copy function
dustymabe Feb 15, 2019
e4970c0
ignition-setup: don't perform umount, rely on systemd
dustymabe Feb 15, 2019
2c69925
Merge pull request #43 from dustymabe/dusty
dustymabe Feb 15, 2019
67e092e
dracut: adapt for s/oem/platform in Ignition
jlebon Feb 26, 2019
9aac3c5
Merge pull request #45 from jlebon/pr/oem-platform
dustymabe Feb 27, 2019
95a0f18
dracut/30ignition: general hack cleanups
jlebon Feb 27, 2019
ca593a1
Merge pull request #46 from jlebon/pr/cleanups
dustymabe Mar 1, 2019
819e0da
module-setup.sh: Check for module qemu_fw_cfg not build-in, so it wor…
jcajka Mar 1, 2019
e3bd9c9
Merge pull request #49 from jcajka/fwcfg
dustymabe Mar 4, 2019
552edb5
grub: find boot partition and use it directly
dustymabe Mar 4, 2019
a66ff6b
Merge pull request #52 from dustymabe/bootlabel
dustymabe Mar 5, 2019
31a3090
grub: find boot partition and use it directly
dustymabe Mar 4, 2019
065e72a
Merge pull request #53 from dustymabe/dusty
dustymabe Mar 5, 2019
cd9ddaf
dracut/30ignition: Only write ignition-setup.service on first boot
jlebon Mar 4, 2019
d4e8899
Merge pull request #54 from jlebon/pr/ignition-setup-tweak
dustymabe Mar 6, 2019
38a5360
dracut/30ignition: split out ignition-setup.service
jlebon Mar 7, 2019
f545dad
dracut/30ignition: add ignition-complete.target
jlebon Mar 7, 2019
f6eb01f
Merge pull request #55 from jlebon/pr/ignition-target
dustymabe Mar 14, 2019
738c676
dracut/30ignition: expect ignition binary in module directory
bgilbert Mar 16, 2019
c62a108
02_ignition_firstboot: Enable networking if Ignition will run
cgwalters Mar 18, 2019
8875cbf
Merge pull request #57 from cgwalters/initramfs-net-ignition
dustymabe Mar 18, 2019
b11553f
Merge pull request #56 from bgilbert/unpath
dustymabe Mar 18, 2019
1768f12
README.md: update documentation
jlebon Mar 20, 2019
29a06b2
Merge pull request #63 from jlebon/pr/update-docs
dustymabe Mar 22, 2019
a65ec16
grub: support overriding network kcmdline args
dustymabe Mar 22, 2019
2b47c9c
Merge pull request #65 from dustymabe/dusty
dustymabe Mar 22, 2019
3410879
30ignition: drop check for coreos.oem.id
bgilbert Mar 25, 2019
047a5e9
30ignition: ignore coreos.randomize_disk_guid
bgilbert Mar 25, 2019
3d2e165
dracut/30ignition: Explicitly add OnFailure=emergency.target
jlebon Mar 20, 2019
852008f
dracut/30ignition: Add mount stage and drop OSTree-specific bits
jlebon Mar 21, 2019
9f4f75f
Merge pull request #67 from bgilbert/cleanups
bgilbert Mar 26, 2019
fd25475
dracut: add CoreOS integration services
jlebon Mar 26, 2019
ec9a492
Merge pull request #47 from jlebon/pr/mount-umount
ajeddeloh Mar 26, 2019
45b8d51
module_setup: include cdrom rules for openstack
Apr 3, 2019
8156402
Merge pull request #71 from ajeddeloh/add-cdrom-rules
jlebon Apr 3, 2019
50d1830
dracut/30ignition: order ignition-complete.target before initrd.target
jlebon Apr 3, 2019
2591950
dracut/30ignition: add missing Before= for mount unit
jlebon Apr 3, 2019
499e086
dracut/30ignition: re-order directives in remount-sysroot
jlebon Apr 3, 2019
803fee8
dracut/30ignition: order ExecStop= units before initrd-switch-root.ta…
jlebon Apr 3, 2019
bf24381
dracut/30ignition: add OnFailure= for ExecStop= services
jlebon Apr 4, 2019
0019df3
Merge pull request #72 from jlebon/pr/fix-umount
jlebon Apr 5, 2019
549002e
dracut/30ignition: link to RHBZ in ignition-complete
jlebon Apr 5, 2019
85f2e65
Merge pull request #74 from jlebon/pr/add-comment
jlebon Apr 5, 2019
df88988
30ignition: drop CoreOS specific bits
jlebon Apr 25, 2019
fe96725
dracut: add 99emergency-timeout
Jun 13, 2019
8551bc7
Merge pull request #85 from rfairley/rfairley-ignition-failure
rfairley Jun 25, 2019
f968140
grub: drop 02_ignition_firstboot
jlebon Jul 16, 2019
1f4ef8e
dracut/30ignition: scramble disk uuid on 1st boot
Aug 2, 2019
6eee792
Merge pull request #93 from ajeddeloh/fix-var
cgwalters Aug 6, 2019
e098a6b
ignition: split ignition-setup into base and user
Jul 31, 2019
7f83fa0
Merge pull request #92 from ajeddeloh/split-boot-units
cgwalters Aug 6, 2019
8b7f1a2
dracut/30ignition: fix typo in module_setup
Aug 6, 2019
343b886
Merge pull request #95 from ajeddeloh/fix-typo
Aug 6, 2019
3a7911b
ignition: fix correct device path when randomizing UUID
tuan-hoang1 Aug 21, 2019
9330616
Merge pull request #100 from tuan-hoang1/fix-partlabel
Aug 22, 2019
9c60150
dracut/30ignition: localize some variables
bgilbert Aug 29, 2019
5a78e77
update-bootengine: drop file
bgilbert Aug 30, 2019
b911126
Merge pull request #101 from bgilbert/bootengine
dustymabe Aug 30, 2019
19a6ab3
README.md: fix download link
spaced Sep 9, 2019
6ea3fab
30ignition: conditionally enable units requiring a boot disk
bgilbert Aug 29, 2019
eb48c18
systemd: don't try to mark live boots complete
bgilbert Sep 5, 2019
cbac371
Merge pull request #102 from bgilbert/live
bgilbert Sep 16, 2019
76246ca
30ignition: fix double slash in ignition-setup-* dest paths
bgilbert Sep 10, 2019
ef73508
30ignition: make ignition-diskful a dependency of ignition-complete
bgilbert Sep 10, 2019
3b0f845
30ignition: on live images, read config.ign from custom initrd
bgilbert Sep 10, 2019
526081f
30ignition: move coreos-gpt-setup RemainAfterExit to correct section
bgilbert Sep 11, 2019
1e959d1
Merge pull request #105 from bgilbert/live2
bgilbert Sep 18, 2019
f06c020
Makefile: New file implementing `make install`
cgwalters Sep 17, 2019
d166d3a
Add RemainAfterExit=yes to systemd units of Type=oneshot
cgwalters Sep 23, 2019
db047c6
Merge pull request #109 from cgwalters/remain
cgwalters Sep 23, 2019
af358bb
30ignition: fix sequencing of target dependencies
bgilbert Sep 24, 2019
496d72e
30ignition: drop OnFailure handler from ignition-diskful.target
bgilbert Sep 24, 2019
d63f76f
dracut: Add an ignition-fetch.service
cgwalters Sep 24, 2019
aada644
Merge pull request #110 from cgwalters/fetch-stage
cgwalters Sep 25, 2019
a40e3ea
30ignition: update ignition-complete.target OnFailure comment
bgilbert Sep 24, 2019
07cb575
Merge pull request #111 from bgilbert/live3
bgilbert Oct 1, 2019
4cdd024
Run ignition-disks earlier to avoid race condition
laenion Oct 1, 2019
cefb71c
Merge pull request #116 from laenion/master
Oct 1, 2019
598bbdd
ignition-firstboot-complete.service: Run as part of basic.target
cgwalters Oct 23, 2019
9a25a5e
Merge pull request #124 from cgwalters/firstboot-complete-early
miabbott Oct 23, 2019
3d08487
Add `ignition-subsequent.target` for non-Ignition boots
cgwalters Oct 31, 2019
207b575
coreos-gpt-setup: workaround old lsblk not having PTUUID
dustymabe Nov 3, 2019
fed8422
Merge pull request #133 from dustymabe/dusty
dustymabe Nov 4, 2019
38af701
firstboot-complete: tell zipl to run
tuan-hoang1 Oct 10, 2019
e96e7fc
30ignition/ignition-setup-user: mount /boot partition ro
jlebon Nov 7, 2019
d9e8a63
Merge pull request #134 from jlebon/pr/mount-ro
cgwalters Nov 7, 2019
f6b3c1b
30ignition: add setfiles
jlebon Nov 27, 2019
8800e42
Add ConditionPathExists=/etc/initrd-release to targets
cgwalters Dec 5, 2019
8168e4c
Merge pull request #140 from cgwalters/no-rerun-switchroot
cgwalters Dec 5, 2019
736459e
units: add ConditionPathExists=/etc/initrd-release everywhere
jlebon Dec 5, 2019
ab53b21
README.md: add details about the branches here
jlebon Dec 9, 2019
c4790bc
dracut: add some bins for s390x zVM instalation
tuan-hoang1 Oct 11, 2019
e490517
Make setfiles optional
laenion Jan 7, 2020
f58f29c
Merge pull request #91 from jlebon/pr/drop-grub
cgwalters Jan 22, 2020
c46a7ae
Makefile: Remove grub/ install bits
cgwalters Jan 27, 2020
ef08dd5
Merge pull request #150 from cgwalters/fix-makeinstall
cgwalters Jan 27, 2020
14808e2
Add ignition-diskful-subsequent.target
cgwalters Jan 27, 2020
16bd0c4
Hook up to CoreOS CI
jlebon Feb 14, 2020
09bed78
Remove obsolete dependencies
laenion Mar 23, 2020
649be85
Declare external applications as optional
laenion Mar 23, 2020
beaece1
Merge pull request #160 from laenion/dracut_dependency_cleanup
dustymabe Mar 24, 2020
8bdbbbe
add coreos-teardown-initramfs-network.service
dustymabe Mar 18, 2020
70c7cd5
coreos-teardown-initramfs-network: refactor into more functions
dustymabe Mar 18, 2020
0d219cb
coreos-teardown-initramfs-network: also propagate initramfs networkin…
dustymabe Mar 18, 2020
e0efb09
coreos-teardown-initramfs-network: remove state files on switch
dustymabe Mar 19, 2020
42b2f06
coreos-teardown-initramfs-network: take down teams as well
dustymabe Mar 19, 2020
03b0035
coreos-teardown-initramfs-network: take down routes too
dustymabe Mar 19, 2020
38c1c35
coreos-teardown-initramfs-network: simplify networking takedown
dustymabe Mar 19, 2020
89f2673
coreos-teardown-initramfs-network: enable the service statically
dustymabe Mar 24, 2020
f67d587
Merge pull request #159 from dustymabe/dusty-network
dustymabe Mar 24, 2020
ea3bdc9
Add `basename` dependency to dracut module
laenion Mar 25, 2020
84c89f4
Add ignition-virtio-dump-journal.service
cgwalters Jan 4, 2020
c44670a
coreos-teardown-initramfs-network: remove After=ignition-files.service
dustymabe Mar 30, 2020
ded5d30
coreos-teardown-initramfs-network: order ExecStop after other ignitio…
dustymabe Mar 30, 2020
793d0ef
Merge pull request #163 from dustymabe/dusty-teardown-ordering
dustymabe Mar 30, 2020
6136be3
Merge pull request #146 from cgwalters/failure-qemu-dump
cgwalters Mar 31, 2020
b1604e9
coreos-teardown-initramfs-network: do SELinux relabel on copied files
dustymabe Apr 23, 2020
70c2792
coreos-teardown-initramfs-network: also skip local loopback interface
dustymabe Apr 23, 2020
2cb06d6
coreos-teardown-initramfs-network: consider ifcfg files in real root …
dustymabe Apr 23, 2020
0665bbe
coreos-teardown-initramfs-network: support coreos.no_persist_ip karg
dustymabe Apr 23, 2020
d6805df
coreos-teardown-initramfs-network: also propagate hostname
dustymabe Apr 23, 2020
390779d
Merge pull request #174 from dustymabe/dusty-teardown-network-improve…
dustymabe Apr 23, 2020
accb795
dracut: add logging to systemd generator
dustymabe Apr 30, 2020
c4bba64
Merge pull request #177 from dustymabe/dusty-systemd-generator
dustymabe Apr 30, 2020
5778769
coreos-teardown-initramfs-network: don't run when emergency.target
dustymabe May 1, 2020
6a87a47
Merge pull request #180 from dustymabe/dusty-fix-net-teardown-in-emer…
dustymabe May 1, 2020
3949f95
99emergency-timeout: also check ignition-fetch.service for failure
bgilbert May 4, 2020
dc156ba
99emergency-timeout: improve readability of Ignition failure message
bgilbert May 4, 2020
e264315
30ignition: drop hard requirement on qemu_fw_cfg
jlebon Apr 30, 2020
7ff38d9
Merge pull request #181 from bgilbert/linewrap
bgilbert May 4, 2020
4dc5106
99emergency-timeout: Dump all failed services
cgwalters Apr 13, 2020
c8c631a
coreos-teardown-initramfs: propagate the automatic multipath conf
May 18, 2020
ee9fcda
Merge pull request #186 from darkmuggle/pr/mpath-redux
May 18, 2020
142bfda
30ignition: clean up Ignition stages ordering
jlebon May 13, 2020
1d34fc2
ignition-setup-user.service: run before multipathd
jlebon May 13, 2020
8f5d1ec
Remove OnFailure= from targets, put in services
jlebon May 27, 2020
70afbb3
30ignition: add wipefs to the initramfs
bgilbert Jun 3, 2020
93d5d83
Merge pull request #190 from bgilbert/wipefs
bgilbert Jun 3, 2020
bdf0a65
30ignition: GPT setup: wait for 'boot' labeled partition
travier Jun 9, 2020
2874fda
ci: test with git master of coreos/ignition
jlebon Jun 9, 2020
1cfb0dd
Add new ignition-fetch-offline.service
jlebon Mar 30, 2020
2b669b0
30ignition: make var in dracut_func local
jlebon Jun 18, 2020
e081e9e
make: install systemd unit as non-executable
lucab Jun 24, 2020
15def21
Merge pull request #196 from lucab/ups/make-install
Jun 24, 2020
fdc7e51
dracut/30ignition: add Ignition LUKS
arithx Jun 10, 2020
e75fef0
Merge pull request #192 from arithx/luks
Jul 10, 2020
6b1d128
dracut/30ignition: fix typo in udev rule
arithx Jul 16, 2020
92661c4
30ignition: move conditional network startup out of ignition-dracut
bgilbert Jul 22, 2020
98ed51d
Merge pull request #200 from bgilbert/condnet
bgilbert Jul 22, 2020
a04ea6d
Merge Ignition-Dracut into Ignition itself.
Jul 23, 2020
629fc6d
Clean-up post-merge files.
Jul 23, 2020
6a5575c
dracut: remove CoreOS specific modules
Jul 23, 2020
12edd76
ci: skip rootfs.uuid test while ratcheting ignition-dracut merge
bgilbert Jul 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 3 additions & 7 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,16 @@ cosaPod(buildroot: true) {
# https://bugs.archlinux.org/task/66526
curl -L --remote-name-all https://kojipkgs.fedoraproject.org//packages/kernel/5.6.7/200.fc31/x86_64/kernel{,-core,-modules}-5.6.7-200.fc31.x86_64.rpm
""")
shwrap("""
# and we want latest ignition-dracut until it is merged
# https://github.com/coreos/fedora-coreos-tracker/issues/511
git clone https://github.com/coreos/ignition-dracut
""")
fcosBuild(skipInit: true, make: true, makeDirs: ["ignition-dracut"], skipKola: true)
fcosBuild(skipInit: true, make: true, skipKola: true)
}

// we run the blackbox tests separately instead of as part of the main kola
// run since it's a distinct kind of test and we want to draw more
// attention to it in the Jenkins UI
// XXX: need a e.g. `--tag !external`

fcosKola(extraArgs: "--denylist-test ext.*")
// XXX: skip rootfs.uuid to ratchet ignition-dracut merge
fcosKola(extraArgs: "--denylist-test ext.* --denylist-test rootfs.uuid")

parallel blackbox: {
shwrap("""
Expand Down
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ endif
all:
./build

# This currently assumes you're using https://github.com/coreos/ignition-dracut/
# If in the future any other initramfs integration appears, feel free to add a PR
# to make this configurable.
.PHONY: install
install: all
for x in dracut/*; do \
bn=$$(basename $$x); \
install -D -t $(DESTDIR)/usr/lib/dracut/modules.d/$${bn} $$x/*; \
done
install -D -t $(DESTDIR)/usr/lib/systemd/system systemd/*
install -m 0755 -D -t $(DESTDIR)/usr/lib/dracut/modules.d/30ignition bin/$(GOARCH)/ignition
install -m 0755 -D -t $(DESTDIR)/usr/bin bin/$(GOARCH)/ignition-validate

Expand Down
25 changes: 10 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,19 @@ Example:
podman run --rm -i quay.io/coreos/ignition-validate - < myconfig.ign
```

## Dracut

For distributions that use dracut, there is an
[ignition-dracut](https://github.com/coreos/ignition-dracut)
repo which contains scripts and systemd units for boot-time
execution. But it's very likely that distributions will have
to do additional work in order to properly integrate with
Ignition.

## Branches

There are two branches:
- `master` works with the `master` branch of ignition-dracut
and is currently used by Fedora CoreOS, which targets
Ignition v2 (spec 3).
- `spec2x` works with the `spec2x` branch of ignition-dracut
and is currently used by CL and RHEL CoreOS, which (for
now) targets Ignition v0.x (spec 2).
- `master`: the actively maintained version of Ignition, supporting config
spec 3.x. Used by Fedora CoreOS, and by Red Hat CoreOS starting with
version 46.82.
- `spec2x`: the legacy branch of Ignition, supporting config spec 1 and 2.x.
Used by RHEL CoreOS, alongside the `spec2x` branch of ignition-dracut,
and by Flatcar Container Linux.

### Legacy ignition-dracut

In Ignition 2.5.0, the old [ignition-dracut](https://github.com/coreos/ignition-dracut) repository, containing scripts and systemd units for boot-time execution, was merged into Ignition itself. CoreOS-specific Dracut modules have moved to the [fedora-coreos-config](https://github.com/coreos/fedora-coreos-config) repository.

[getting started]: doc/getting-started.md
[issues]: https://github.com/coreos/ignition/issues/new/choose
Expand Down
8 changes: 8 additions & 0 deletions dracut/30ignition/99-xx-ignition-systemd-cryptsetup.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
SUBSYSTEM!="block", GOTO="systemd_cryptsetup_end"

# This overrides systemd default behavior from 99-systemd.rules, which ignores unformatted crypto devices.
# https://github.com/systemd/systemd/commit/90e6abaea0cfd25093aae1ad862c5c909ae55829
# Ignition relies on unformatted crypto devices being discovered to trigger formatting
SUBSYSTEM=="block", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_TYPE}=="", ENV{ID_FS_USAGE}=="", ENV{SYSTEMD_READY}="1"

LABEL="systemd_cryptsetup_end"
14 changes: 14 additions & 0 deletions dracut/30ignition/ignition-complete.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# This target is reached when Ignition finishes running. Note that it gets
# activated *only* on first boot (or if ignition.firstboot=1 is provided).
# Thus, it is also an API for units to use so that they are activated only on
# first boot. Simply add a link under ignition-complete.target.requires in the
# initrd.
[Unit]
Description=Ignition Complete
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
Before=initrd.target

# Make sure we stop all the units before switching root
Conflicts=initrd-switch-root.target umount.target
Conflicts=dracut-emergency.service emergency.service emergency.target
12 changes: 12 additions & 0 deletions dracut/30ignition/ignition-diskful-subsequent.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This target is a combination of ignition-subsequent.target and
# ignition-diskful.target - units here should only run when we have a
# boot disk and *aren't* doing the first boot.
[Unit]
Description=Ignition Subsequent Boot Disk Setup
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
Before=ignition-subsequent.target

# Make sure we stop all the units before switching root
Conflicts=initrd-switch-root.target umount.target
Conflicts=dracut-emergency.service emergency.service emergency.target
12 changes: 12 additions & 0 deletions dracut/30ignition/ignition-diskful.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This target contains Ignition units that should only run when we have a
# boot disk, i.e. when we're not running diskless from a live image in RAM.
# Like ignition-complete.target, it only runs on first boot.
[Unit]
Description=Ignition Boot Disk Setup
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
Before=ignition-complete.target

# Make sure we stop all the units before switching root
Conflicts=initrd-switch-root.target umount.target
Conflicts=dracut-emergency.service emergency.service emergency.target
35 changes: 35 additions & 0 deletions dracut/30ignition/ignition-disks.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[Unit]
Description=Ignition (disks)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
After=ignition-fetch.service
Before=ignition-mount.service

# This stage runs between `basic.target` and `initrd-root-device.target`,
# see https://www.freedesktop.org/software/systemd/man/bootup.html
# Make sure to run before the file system checks, as sgdisk will trigger
# udev events, potentially resulting in race conditions due to disappearing
# devices.

# Note that CL runs this before `local-fs-pre.target` to allow for configs that
# completely wipe the rootfs. Though we're not there yet. But we still run
# before `sysroot.mount` on principle.
Before=initrd-root-device.target
Before=sysroot.mount

OnFailure=emergency.target
OnFailureJobMode=isolate

# This stage requires udevd to detect disk partitioning changes.
Requires=systemd-udevd.service
After=systemd-udevd.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=disks
28 changes: 28 additions & 0 deletions dracut/30ignition/ignition-fetch-offline.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This unit creates /run/ignition/neednet if networking needs to be enabled.
# The distro is responsible for sequencing a unit between
# ignition-fetch-offline.service and ignition-fetch.service, detecting the
# flag file with ConditionPathExists=, and enabling networking.

[Unit]
Description=Ignition (fetch-offline)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
After=basic.target

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
# We run after the setup stage has run because it may copy in new/different
# ignition configs for us to consume.
After=ignition-setup-base.service
After=ignition-setup-user.service
Before=ignition-fetch.service

OnFailure=emergency.target
OnFailureJobMode=isolate

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=fetch-offline
26 changes: 26 additions & 0 deletions dracut/30ignition/ignition-fetch.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
[Unit]
Description=Ignition (fetch)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target
After=basic.target
ConditionPathExists=/run/ignition/neednet

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
# We run after the setup stage has run because it may copy in new/different
# ignition configs for us to consume.
After=ignition-fetch-offline.service
Before=ignition-disks.service

OnFailure=emergency.target
OnFailureJobMode=isolate

# If we run, we definitely need network, so make sure we run after.
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=fetch
21 changes: 21 additions & 0 deletions dracut/30ignition/ignition-files.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Ignition (files)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

OnFailure=emergency.target
OnFailureJobMode=isolate

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
After=ignition-mount.service

# Run before initrd-parse-etc so that we can drop files it then picks up.
Before=initrd-parse-etc.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=files --log-to-stdout
71 changes: 71 additions & 0 deletions dracut/30ignition/ignition-generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/bin/bash
# -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# ex: ts=8 sw=4 sts=4 et filetype=sh

set -e

# Generators don't have logging right now
# https://github.com/systemd/systemd/issues/15638
exec 1>/dev/kmsg; exec 2>&1

UNIT_DIR="${1:-/tmp}"

cmdline=( $(</proc/cmdline) )
cmdline_arg() {
local name="$1" value="$2"
for arg in "${cmdline[@]}"; do
if [[ "${arg%%=*}" == "${name}" ]]; then
value="${arg#*=}"
fi
done
echo "${value}"
}

cmdline_bool() {
local value=$(cmdline_arg "$@")
case "$value" in
""|0|no|off) return 1;;
*) return 0;;
esac
}

add_requires() {
local name="$1"; shift
local target="$1"; shift
local requires_dir="${UNIT_DIR}/${target}.requires"
mkdir -p "${requires_dir}"
ln -sf "../${name}" "${requires_dir}/${name}"
}

# This can't be done with ConditionKernelCommandLine because that always
# starts the unit's dependencies. We want to start networking only on first
# boot.
if $(cmdline_bool 'ignition.firstboot' 0); then
add_requires ignition-complete.target initrd.target

# Invoke distro hook for detecting whether we're booted from a live image,
# and therefore won't have a root disk.
if ! command -v is-live-image >/dev/null || ! is-live-image; then
add_requires ignition-diskful.target ignition-complete.target

# ignition-setup-user.service should depend on the boot device node
# only on diskful boots
mkdir -p "${UNIT_DIR}/ignition-setup-user.service.d"
cat > "${UNIT_DIR}/ignition-setup-user.service.d/diskful.conf" <<EOF
[Unit]
Requires=dev-disk-by\x2dlabel-boot.device
After=dev-disk-by\x2dlabel-boot.device
EOF
fi
else
# If we're doing a non-Ignition (subsequent) boot, then
# queue a different target. This is necessary so that units
# like `ignition-ostree-mount-sysroot.service`
# can cleanly distinguish between the two.
add_requires ignition-subsequent.target initrd.target
if ! command -v is-live-image >/dev/null || ! is-live-image; then
add_requires ignition-diskful-subsequent.target ignition-subsequent.target
fi
fi

echo "PLATFORM_ID=$(cmdline_arg ignition.platform.id)" > /run/ignition.env
3 changes: 3 additions & 0 deletions dracut/30ignition/ignition-luks.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# We don't ship cracklib dicts in the initramfs, so don't check
# generated clevis keys against them
dictcheck = 0
33 changes: 33 additions & 0 deletions dracut/30ignition/ignition-mount.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[Unit]
Description=Ignition (mount)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
# We need to make sure the partitions and filesystems are set up before
# mounting. This is also guaranteed through After=initrd-root-fs.target but
# just to be explicit.
After=ignition-disks.service
Before=ignition-files.service

# Make sure ExecStop= runs before we switch root
Before=initrd-switch-root.target

OnFailure=emergency.target
OnFailureJobMode=isolate

# Make sure the final /sysroot is ready first, since we're mounting under there
Requires=initrd-root-fs.target
After=initrd-root-fs.target

# Make sure root filesystem is remounted read-write if needed
After=ignition-remount-sysroot.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=mount --log-to-stdout
ExecStop=/usr/bin/ignition --root=/sysroot --platform=${PLATFORM_ID} --stage=umount --log-to-stdout
20 changes: 20 additions & 0 deletions dracut/30ignition/ignition-remount-sysroot.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[Unit]
Description=Remount /sysroot read-write for Ignition
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
# Some Linux Distributions don't pass a rw option on the kernel
# commandline and thus mount the root filesystem ro by default. In
# this case, remount /sysroot to rw (issue #37)
DefaultDependencies=no
Before=ignition-diskful.target

OnFailure=emergency.target
OnFailureJobMode=isolate

After=sysroot.mount
ConditionPathIsReadWrite=!/sysroot

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mount -o remount,rw /sysroot
18 changes: 18 additions & 0 deletions dracut/30ignition/ignition-setup-base.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[Unit]
Description=Ignition (setup base config)
Documentation=https://github.com/coreos/ignition
ConditionPathExists=/etc/initrd-release
DefaultDependencies=false
Before=ignition-complete.target

OnFailure=emergency.target
OnFailureJobMode=isolate

# Stage order: setup -> fetch-offline [-> fetch] -> disks -> mount -> files.
Before=ignition-fetch-offline.service

[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/run/ignition.env
ExecStart=/usr/sbin/ignition-setup-base