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

Calico kube-policy-controller IOError: : [Errno 30] Read-only file system: '/etc/hosts' #3867

Closed
BlueMonday opened this issue Nov 15, 2017 · 2 comments

Comments

@BlueMonday
Copy link
Contributor

BlueMonday commented Nov 15, 2017

  1. What kops version are you running? use kops version

    Version 1.8.0-beta.1 (git-2b2b5971b)

  2. What Kubernetes version are you running? use kubectl version

    Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.2", GitCommit:"922a86cfcd65915a9b2f69f3f193b8907d741d9c", GitTreeState:"clean", BuildDate:"2017-07-21T08:08:00Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

  3. What cloud provider are you using?

    AWS


I updated my cluster using kops built from source and the calico policy controller is now crash looping.

╭─serenst@unicron  ~/go/src/k8s.io/kops  ‹master*› 
╰─$ kubectl logs -n kube-system calico-policy-controller-309338636-7hmnz
2017-11-15 23:24:51,804 7 INFO Configuring /etc/hosts
Traceback (most recent call last):
  File "<string>", line 555, in <module>
  File "<string>", line 531, in configure_etc_hosts
IOError: [Errno 30] Read-only file system: '/etc/hosts'
controller returned -1

This seems to be caused by this recent change: #3848

/etc/hosts/ is now mounted as readOnly into the kube-policy-controller:

However the CONFIGURE_ETC_HOSTS environment variable is also set to true:

I am guessing that the fix would be to either:

  • set CONFIGURE_ETC_HOSTS tofalse (or not set it at all, the default is false)
  • mount /etc/hosts/ with write permissions
  • not mount /etc/hosts at all?

I don't actually know which one is the correct solution.

@BlueMonday
Copy link
Contributor Author

@justinsb @marshallbrekka

@chrislovecnm
Copy link
Contributor

#3867 is fixed in my Calico PR

k8s-github-robot pushed a commit that referenced this issue Nov 22, 2017
Automatic merge from submit-queue.

Updating Calico manifests to Calico release 2.6.2

Renamed the k8s-1.8 manifest to a k8s-1.7. This is required because of config
change that occurs between k8s 1.6 and k8s 1.7. This refactor will also
be re-used when Calico Kubernetes data source support is added to kops.
Updated bootstrapchannelbuilder with the new Calico version numbers.

The diffs for the k8s-1.6 version is pretty rough, tried to make it cleaner, but nada.

FIXES: #3866
FIXES: #3867

Line: https://github.com/kubernetes/kops/compare/master...chrislovecnm:calico-2.6-update?expand=1#diff-891cbc61587adb202b66b7c9bc6896daR209  is why Calico would not start on k8s 1.6 - thanks @caseydavenport 

 **TODO**
Testing K8s versions

- [x] test 1.5
- [x] test 1.6
- [x] test 1.7
- [x] test 1.8

/cc @blakebarnett @itajaja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants