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

Add FIPS mode secret and vendor in libpod/pkg/secret #1537

Merged
merged 1 commit into from
May 1, 2018

Conversation

umohnani8
Copy link
Member

Update cri-o to use the secrets package from libpod/pkg/secret,
which also brings in support for FIPS mode secret.
If the host is in FIPS mode (i.e /etc/system-fips exists) /run/secrets/system-fips
is created in the container so that the container can also run in FIPS mode.

Signed-off-by: umohnani8 [email protected]

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. cncf-cla: yes labels Apr 27, 2018
@rhatdan
Copy link
Contributor

rhatdan commented Apr 27, 2018

LGTM
/test all

@umohnani8
Copy link
Member Author

I don't understand why the mounts file is not being overridden in the tests by the --default-mounts-file flag. It definitely works manually, any ideas?
"$CRIO_BINARY" ${HOOKS_OPTS} --conmon "$CONMON_BINARY" --listen "$CRIO_SOCKET" --cgroup-manager "$CGROUP_MANAGER" --default-mounts-file "$TESTDIR/containers/mounts.conf"...

@rhatdan
Copy link
Contributor

rhatdan commented Apr 27, 2018

Look to see if this is the only time CRI_BINARY is called.

@umohnani8
Copy link
Member Author

/test all

@rhatdan
Copy link
Contributor

rhatdan commented Apr 28, 2018

/test kata-containers

@rhatdan
Copy link
Contributor

rhatdan commented Apr 28, 2018

@mrunalp Kata containers seems to not be working. Who do we ping to see what is going on?

@rhatdan
Copy link
Contributor

rhatdan commented Apr 28, 2018

/retest

cmd/crio/main.go Outdated
Usage: "add one or more default mount paths in the form host:container",
cli.StringFlag{
Name: "default-mounts-file",
Usage: "path to default mounts file",
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking api change, you should actually add a new option and we need to support the old one at least for 2 to 3 releases.

Copy link
Member Author

Choose a reason for hiding this comment

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

Reverted to have the deprecated flag still there.


# default_mounts_file is the file path holding the default mounts to be mounted for the
# container when created.
# default_mounts_file = "{{ .DefaultMountsFile }}"
Copy link
Member

Choose a reason for hiding this comment

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

This is a breaking change as well, we need to support old and new and deprecate the old one so people have time to migrate. Basically, when they use the old one, we print a log so that they can later do the switch

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

run crictl create "$pod_id" "$TESTDATA"/container_redis.json "$TESTDATA"/sandbox_config.json
echo "$output"
[ "$status" -eq 0 ]
ctr_id="$output"
run crictl exec --sync "$ctr_id" cat /proc/mounts
run crictl exec --sync "$ctr_id" ls /run/secrets
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather add a new test than changing an old one just to verify a new condition. Please add a new one for all these cases

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Apr 30, 2018
Update cri-o to use the secrets package from libpod/pkg/secret,
which also brings in support for FIPS mode secret.
If the host is in FIPS mode (i.e /etc/system-fips exists) /run/secrets/system-fips
is created in the container so that the container can also run in FIPS mode.

Signed-off-by: umohnani8 <[email protected]>
@umohnani8
Copy link
Member Author

/test all

@umohnani8
Copy link
Member Author

Not sure why kata CI is failing. @mrunalp who should I talk to?

@mrunalp
Copy link
Member

mrunalp commented Apr 30, 2018

@sboeuf Can you take a look at why kata containers tests are failing?

@sboeuf
Copy link

sboeuf commented Apr 30, 2018

@mrunalp nothing related to the PR. I have restarted the job since there is no reason for failure here.

@sboeuf
Copy link

sboeuf commented Apr 30, 2018

/test kata-containers

1 similar comment
@sboeuf
Copy link

sboeuf commented May 1, 2018

/test kata-containers

@runcom
Copy link
Member

runcom commented May 1, 2018

LGTM

@sboeuf
Copy link

sboeuf commented May 1, 2018

Ok kata build fixed. Let's retest one more time !

@sboeuf
Copy link

sboeuf commented May 1, 2018

/test kata-containers

1 similar comment
@sboeuf
Copy link

sboeuf commented May 1, 2018

/test kata-containers

@umohnani8
Copy link
Member Author

Tests pass!

@sboeuf
Copy link

sboeuf commented May 1, 2018

;)

@rhatdan
Copy link
Contributor

rhatdan commented May 1, 2018

Ok lets merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants