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

upgrade: deprecate RELEASE upgrade, fix thick/thin jail upgrades #811

Merged
merged 6 commits into from
Jan 20, 2025

Conversation

tschettervictor
Copy link
Collaborator

@tschettervictor tschettervictor commented Jan 14, 2025

Deprecate 'bastille upgrade RELEASE'

  • this is because releases are bootstrapped using bastille bootstrap release
  • this would break thin jails

Fix #658
Implement #621 #481
Fix #372

Testing
Create and upgrade a thick jail eg (13.4-RELEASE - 14.2-RELEASE) - verify functionality and updates
Create and upgrade a thin jail - verify functionality and updates (all this does is "sed" the jail.conf and fstab to point to the selected release

@tschettervictor
Copy link
Collaborator Author

@michael-o What about integrating a switch to "auto continue" the upgrade process?

Right now it's three commands to upgrade fully. With a switch it could do all 3 in a row.

@michael-o
Copy link
Contributor

@michael-o What about integrating a switch to "auto continue" the upgrade process?

Right now it's three commands to upgrade fully. With a switch it could do all 3 in a row.

I'd keep it as is for the moment and consider something like --nonstop later.

@michael-o
Copy link
Contributor

@tschettervictor
Copy link
Collaborator Author

tschettervictor commented Jan 16, 2025

@michael-o Update and upgrade PRs have been updated with your suggestions.

Also, are you ok with deprecating 'upgrade RELEASE'?

It not even wise IMO as it would end up breaking thin jails. If we want a new release, we can simply bootstrap it. Otherwise (in the case of thick jails) an 'upgrade jailname' will take care of it.

@michael-o
Copy link
Contributor

@michael-o Update and upgrade PRs have been updated with your suggestions.

Also, are you ok with deprecating 'upgrade RELEASE'?

It not even wise IMO as it would end up breaking thin jails. If we want a new release, we can simply bootstrap it. Otherwise (in the case of thick jails) an 'upgrade jailname' will take care of it.

Upgrading a RELEASE doesn't make sense, I do agree. Deprecate it. Bootstrap and remount is better.

Copy link
Contributor

@michael-o michael-o left a comment

Choose a reason for hiding this comment

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

This is logically sound to me now.

@tschettervictor
Copy link
Collaborator Author

This is logically sound to me now.

Does it test ok?

@bmac2
Copy link
Collaborator

bmac2 commented Jan 17, 2025

/var/db/etcupdate/current/etc/ttys
/var/db/mergemaster.mtree
To install the downloaded upgrades, run 'freebsd-update [options] install'.

Please run 'bastille upgrade thick1 install' to finish installing updates.
root@fbsd:/home/bmccormick/bastille # bastille upgrade thick1 install
jexec: jail "-d" not found
jls: jail "-d" not found
The specified jail either doesn't exist or does not have freebsd-version.
root@fbsd:/home/bmccormick/bastille #

this error when upgrading a thick jail.

@tschettervictor

@michael-o
Copy link
Contributor

This is logically sound to me now.

Does it test ok?

Will resume on Monday

@bmac2
Copy link
Collaborator

bmac2 commented Jan 18, 2025

now testing correctly for me. Need @michael-o to finish his testing on this next week.

@yaazkal @tschettervictor

Copy link
Contributor

@michael-o michael-o left a comment

Choose a reason for hiding this comment

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

Works as requested. One nit:

Please run 'bastille upgrade deblndw013x4j install' to finish installing updates.
root@deblndw013x:~/bastille (upgrade_deprecate_release *%<>)
# bastille upgrade deblndw013x4j install
src component not installed, skipped
Installing updates...
Kernel updates have been installed.  Please reboot and run
'freebsd-update [options] install' again to finish installing updates.
root@deblndw013x:~/bastille (upgrade_deprecate_release *%<>)
# bastille upgrade deblndw013x4j install
src component not installed, skipped
Installing updates...Scanning /usr/local/bastille/jails/deblndw013x4j/root/usr/share/certs/blacklisted for certificates...
Scanning /usr/local/bastille/jails/deblndw013x4j/root/usr/share/certs/trusted for certificates...
 done.

Bastille says to run install, but after kernel updates it does not tell to run install again.

In any case, it works.

@bmac2 bmac2 merged commit a335721 into BastilleBSD:master Jan 20, 2025
1 check passed
@tschettervictor tschettervictor deleted the upgrade_deprecate_release branch January 20, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants