Skip to content

Commit

Permalink
Merge pull request #4268 from kolyshkin/fix-resolv-conf-ro
Browse files Browse the repository at this point in the history
container_create: fix /etc/resolv.conf to be ro for a read-only container
  • Loading branch information
openshift-merge-robot committed Oct 15, 2020
2 parents b49cac4 + 5502607 commit af6e36a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/container_create_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ func (s *Server) createSandboxContainer(ctx context.Context, ctr ctrIface.Contai
Destination: "/etc/resolv.conf",
Type: "bind",
Source: sb.ResolvPath(),
Options: []string{"bind", "nodev", "nosuid", "noexec"},
Options: append(options, []string{"bind", "nodev", "nosuid", "noexec"}...),
})
}

Expand Down
2 changes: 1 addition & 1 deletion test/ctr.bats
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,7 @@ function wait_until_exit() {
"$TESTDATA"/container_config.json > "$newconfig"
ctr_id=$(crictl create "$pod_id" "$newconfig" "$TESTDATA"/sandbox_config.json)
crictl start "$ctr_id"
wait_until_exit "$ctr_id"
EXPECTED_EXIT_STATUS=1 wait_until_exit "$ctr_id"
}

@test "ctr create with non-existent command" {
Expand Down

0 comments on commit af6e36a

Please sign in to comment.