-
Notifications
You must be signed in to change notification settings - Fork 359
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
Edns certs stage2 w initramfs r9 #6094
base: rhel-9
Are you sure you want to change the base?
Edns certs stage2 w initramfs r9 #6094
Conversation
b356d48
to
5bd3098
Compare
Kickstart %certificate section is used. Submodule, data structures, parsing. Resolves: RHEL-61430 Patch modified by rvykydal.
Unlike the %packages section where the data of all sections are merged into single data object the %certificates section holds the per instance section data in a list. Related: INSTALLER-61430
Resolves: RHEL-61430
Resolves: RHEL-61430
The certificates imported in initramfs are already imported earlier by a service. Resolves: RHEL-61430
Resolves: RHEL-61430
Resolves: RHEL-61430
In case they are needed or processed by package scriptlets Resolves: RHEL-61430
Resolves: RHEL-61430
f77f727
to
1c58b68
Compare
All the current unit-test failures are due to missing updated pykickstart. |
Today pykickstart should go into nigthtly compose and we can run kickstart tests then. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - just some minor improvement suggestions about how we write out the cert files. :)
@@ -60,9 +67,17 @@ def __init__(self): | |||
self.realm_changed = Signal() | |||
self._realm = RealmData() | |||
|
|||
def _add_module(self, security_module): | |||
"""Add a base kickstart module.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this correct ? Looks like a copy-paste leftover on the first glance. ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just followed the existing code in storage module:
"""Add a base kickstart module.""" |
Since rhel 10 we have SubmoduleManager which provides the method so this patch is specific to rhel-9 branch. That said I'd leave it as it is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the patch
mkdirChain(dst_dir) | ||
|
||
dst = join_paths(dst_dir, cert.filename) | ||
with open(dst, 'w') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should specify the text mode explicitly ? Eq. wt
to make it apparent that we are writing text data right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest this as upstream patch first.
dst_dir, cert.filename) | ||
mkdirChain(dst_dir) | ||
|
||
dst = join_paths(dst_dir, cert.filename) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if the file already exists ? While it will most likely write over it, it might be a good idea to log that we are overwriting an existing file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, we even have this upstream, I must have somehow missed the patch:
649c6bb
if os.path.exists(dst): | ||
log.warning("Certificate file %s already exists, replacing.", dst) | ||
|
||
with open(dst, 'w') as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here - we might want to use 'wt' & log if we overwrite something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logging is there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves: RHEL-61430
Don't require it on parsing level, don't own a default. Resolves: RHEL-61430
Resolves: RHEL-61430
Also dump for transfer durig switchroot so that the certificates can be potentially imported early after switchroot by a service. Resolves: RHEL-61430
Resolves: RHEL-61430
For example when --dir is pointing to read-only filesystem. Resolves: RHEL-61430
Resolves: RHEL-61430
fdaae76
to
86e7913
Compare
/kickstart-test --testtype smoke |
/kickstart-test --kstest-pr 1358 certificate |
1 similar comment
/kickstart-test --kstest-pr 1358 certificate |
Port of #6045 to rhel9.
Port to rhel10 is used as it does not contain updates for module import ordering fixes.
The (minor) modifications of rhel10 port patch:
TODO