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

Fix stackable sources for build-iso #2061

Merged
merged 2 commits into from
May 2, 2024

Conversation

davidcassany
Copy link
Contributor

@davidcassany davidcassany commented Apr 30, 2024

This PR fixes the use of --overlay-* flags in build-iso command. With the latest changes the were using the --delete option in rsync to dump the sources to be stacked on an already existing source. This PR distinguishes a couple of use cases the former DumpSource method equivalent is is MirrorRoot now, as this includes --delete option for rsync and the creation of essential root-tree mountpoint dirs such as /dev, /sys, /proc... I noted this as using the overlay-iso flag in an ISO lead to an image including empty /dev, /tmp, /proc, etc.

In addition this PR also removes the DeployImage that was not used anywhere in code, this was just a leftover.

@davidcassany davidcassany requested a review from a team as a code owner April 30, 2024 13:24
@davidcassany davidcassany added the kind/bug Something isn't working label Apr 30, 2024
pkg/elemental/elemental.go Outdated Show resolved Hide resolved
@frelon
Copy link
Contributor

frelon commented Apr 30, 2024

We probably don't use the overlay- parameters also, if they are not used by harvester I would be fine with removing them entirely.

@davidcassany
Copy link
Contributor Author

We probably don't use the overlay- parameters also, if they are not used by harvester I would be fine with removing them entirely.

Well I discovered it trying to set the ssh authorized public key for a password less remote login into the ISO. So using --overlay-iso I added a cloud-config file to the ISO. I think they are useful, even I agree they could be reimagined. Also the --overlay-uefi could be really useful if we don't want to include the grub images for live systems into the image itself. I'd keep them for now, but I see your point, they are weird indeed.

Signed-off-by: David Cassany <dcassany@suse.com>
@davidcassany davidcassany force-pushed the fix_build_iso_overlay_flags branch 2 times, most recently from 36c5862 to 9d6da31 Compare April 30, 2024 15:34
Signed-off-by: David Cassany <dcassany@suse.com>
@davidcassany davidcassany enabled auto-merge (squash) April 30, 2024 15:43
@davidcassany davidcassany merged commit 22baf14 into rancher:main May 2, 2024
16 of 17 checks passed
@davidcassany davidcassany deleted the fix_build_iso_overlay_flags branch May 2, 2024 08:35
davidcassany added a commit to davidcassany/elemental-toolkit that referenced this pull request Jul 18, 2024
* Fix stackable sources for build-iso
* Move syncFunc as a parameter of DumpSource

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 22baf14)
davidcassany added a commit that referenced this pull request Jul 29, 2024
* Fix stackable sources for build-iso (#2061)

* Fix stackable sources for build-iso
* Move syncFunc as a parameter of DumpSource

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 22baf14)

* Fix error return

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit f9934d7)

* Change default root password

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 46a88e1)

* Allow key pair of ssh connection in tests

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit a5f526d)

* Set legacy password for upgrade test

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 6f0b28e)

* Allow insecure registries (#2131)

* Allow skipping TLS verification on registries

Signed-off-by: David Cassany <dcassany@suse.com>

* Improve error logging

Signed-off-by: David Cassany <dcassany@suse.com>

* Fix flag default value

Signed-off-by: David Cassany <dcassany@suse.com>

* Fix image extractor mock and use default TLS verification for tests

Signed-off-by: David Cassany <dcassany@suse.com>

---------

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 22996ef)

* Fix permissions

* Set token to explicit content read permissions
  (cherry picked from commit 3d657c9)

* Move permissions at top level
  (cherry picked from commit 8b8ae12)

* Fix workflows, permissions at top level
  (cherry picked from commit d3da1cf)

* Leftover from d3da1cf
  (cherry picked from commit 3206436)

* Fix nested permissions definition

  Top level permissions can't be increased for specific jobs,
  hence setting the permission on each specific job on workflows
  that require more fine grain approach.

  In addition it removes the pull-request permission as this is mostly
  required for PR decorators, read/write labels, etc.
  (cherry picked from commit 1a0903a)

* Refactor ci (#2137)

* Refactor CI to use a local registry
* Cache image and fetch image tarballs
* Composite fetch images
* Push to insecure registry with podman
* Simplify workflow runs
* Improve cache cleanup
* Improve ip detection

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 644cdc7)

* Fix cache cleaning for PRs and main pushes (#2144)

* Fix cache cleaning for PRs and main pushes
* Update .github/workflows/cache-cleanup.yaml

Co-authored-by: Francesco Giudici <francesco.giudici@gmail.com>
Signed-off-by: David Cassany Viladomat <dcassany@suse.com>
(cherry picked from commit f54f683)

* Remove unused steps in workflow

Signed-off-by: David Cassany <dcassany@suse.com>
(cherry picked from commit 51a85a7)
(cherry picked from commit 9f8d14fea58c2e458f8840d274422352f0b0b1c2)

* Do not fetch upstream go dependencies

Signed-off-by: David Cassany <dcassany@suse.com>

* Update cmd/cloud-init.go

Missing err

Co-authored-by: Francesco Giudici <francesco.giudici@gmail.com>
Signed-off-by: David Cassany Viladomat <dcassany@suse.com>

---------

Signed-off-by: David Cassany <dcassany@suse.com>
Signed-off-by: David Cassany Viladomat <dcassany@suse.com>
Co-authored-by: Francesco Giudici <francesco.giudici@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants