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
Add support for FIPS mode #452
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
shell: fips-mode-setup --enable | ||
|
||
- name: reboot the machine | ||
reboot: |
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.
There's a problem here. Vagrant is not able to detect a reboot, so it loses its synced folder functionality, that means we can't collect the artifacts once test is done.
Is the reboot really necessary?
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.
@netoarmando first of all, thank you for your review!
The reboot
is necessary, as FIPS setup includes changing the boot parameters. Without the reboot, fips-mode-setup --is-enabled
returns return code 2, which means disabled.
Regarding possible solution, I think, we can either:
- execute some sort of re-sync command after reboot (
reboot
has a hook for that) - move the reboot to provisioning phase before the synchronization is established
c4cdc08
to
6d05288
Compare
I'll leave it here, as the check has to be moved somewhere else.
|
fa3002b
to
5c0337e
Compare
miskopo/freeipa#11 shows that the current implementation correctly reloads the machines and fetches the test results. Great success! |
Current state:
To do:
|
1dd2cf8
to
28e8b13
Compare
I've added some logging, exception handling and check for status of FIPS installation. |
I call this a great success
|
See the full run here. Provisioning in FIPS, logging, checking of installation, all work as expected. I am thinking about adding some tests though. This PR, however, is ready in my humble opinion. |
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.
Thanks for this @miskopo. Check my comments, I'll look into the logs later today.
self.build_url, 'rpms/freeipa-prci.repo'), | ||
update_packages=self.update_packages, | ||
selinux_enforcing=self.selinux_enforcing)) | ||
self.build_url, 'rpms/freeipa-prci.repo'), |
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.
On the other hand, I think we can replace this dict()
with a beautiful literal. :D
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.
@netoarmando I hope this is what you meant :)
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.
it is, maybe a little more formatted, like this:
constants.ANSIBLE_VARS_TEMPLATE.format(
action_name=self.action_name),
os.path.join(self.data_dir, 'vars.yml'),
{
"repofile_url": urllib.parse.urljoin(
self.build_url, 'rpms/freeipa-prci.repo'
),
"update_packages": self.update_packages,
"selinux_enforcing": self.selinux_enforcing,
"fips": self.fips,
}
)
Introduce fips bool variable and its handling, implement FIPS setup to provisioning playbooks. Include check to ensure that FIPS mode is initialized correctly prior to launching the test phase. Add support for reloading all machines from vagrant's side (this halts all the machines, starts them up and reestablishes shared folder). Reload can be triggered by creating a REBOOT_READY file in the vagrant shared folder before the test phase (either in provisioning or upping phase). Signed-off-by: Michal Polovka <mpolovka@redhat.com>
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, formatting that dict is a plus. Approving this.
This has been deployed last Friday (Apr 1) in the nightly runners. It will be deployed in the gating runners today. |
Introduce fips bool variable and its handling, implement FIPS setup to
provisioning playbooks. Include check to ensure that FIPS mode is
initialized correctly prior to launching the test phase.
Add support for reloading all machines from vagrant's side (this halts
all the machines, starts them up and reestablishes shared folder).
Reload can be triggered by creating a REBOOT_READY file in the vagrant
shared folder before the test phase (either in provisioning or upping
phase).
Signed-off-by: Michal Polovka mpolovka@redhat.com