Skip to content

after replacing default config file, removing the MC causes the config file to disappear #782

@miabbott

Description

@miabbott

Using OpenShift 4.1.0-rc.5:

  1. Create a MC that replaces /etc/containers/policy.json. In the example below, this is the default contents of /etc/containers/policy.json run through jq -c and requoted:
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfig
metadata:
  labels:
    machineconfiguration.openshift.io/role: worker
  name: 50-policy-json
spec:
  config:
    ignition:
      version: 2.2.0
    storage:
      files:
      - contents:
          source: data:,%7B%22default%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%2C%22transports%22%3A%7B%22docker-daemon%22%3A%7B%22%22%3A%5B%7B%22type%22%3A%22insecureAcceptAnything%22%7D%5D%7D%7D%7D
        filesystem: root
        mode: 0644
        path: /etc/containers/policy.json
  1. Wait for nodes to be updated
  2. Remove the MC
  3. Wait for nodes to be updated
  4. Check the nodes and find that /etc/containers/policy.json is missing

FWIW, /etc/containers/policy.json is owned by the containers-common package

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions