Comments (6)
This is an SELinux issue, the files need to be labled as container_t (if I remember correctly) for this to work. I've been working around this locally by running the generate outside a container, since my environment is already set up with all the required dependencies (go, pyyaml):
make merge-cluster-roles assets docs
Another option is to set SELinux to permissive mode before running make generate
. Generally though I think it's another sign we should improve the process to not have any hurdles like this one.
from cluster-monitoring-operator.
Disabling SELinux does the trick. Thanks @elad661 !!!
from cluster-monitoring-operator.
Disabling SELinux should not be the solution. We should figure out what is mislabeled and fix it. RUnning something like containers with SELinux disabled is asking for trouble.
The label to assign is container_file_t, container_t is a process label, and can not be assigned to content.
from cluster-monitoring-operator.
@rhatdan Nothing is "mislabeled" in a way that we can fix properly. What happens here is simple: make generate
mounts the cluster-monitoring-operator source tree as a volume for the container (see https://github.com/openshift/cluster-monitoring-operator/blob/master/Makefile#L48 ), and because all the files are (probably) labeled user_home_t
SELinux doesn't allow the container to access any of them.
I think the proper way to fix this would be moving away from using a container for make generate
, since it's reasonable to expect people who contribute to cluster-monitoring-operator will have Go installed on their development machine.
from cluster-monitoring-operator.
Can you disable enforcement in the container IE Run with label:disable rather then disable the selinux on the host.
from cluster-monitoring-operator.
Thanks @rhatdan, that works. I'll send a PR to add that parameter to the Makefile.
Note that I never advocated for disabling SELinux, I just suggested setting it to permissive mode as a temporary workaround.
from cluster-monitoring-operator.
Related Issues (20)
- Support `Probe` resources HOT 3
- {Request} Ability to configure Prometheus Exporters HOT 5
- Invalid externalURL since ad2d747f2ef037647ebc9f7d5b22118d0dab4bd2 HOT 4
- Release 4.12 Checklist HOT 3
- Missing Metrics in Prometheus on openshift 3.11 HOT 4
- User workload prometheus scraps targets managed by monitoring prometheus instance HOT 4
- Release 4.13 Checklist HOT 5
- crio metrics via http is not safe HOT 7
- Allow kube-state-metrics configuration HOT 3
- Reject invalid PrometheusRule objects beforehand rather than failing the reconciliation HOT 5
- Alerts generated by user-workload-monitoring are not included in remoteWrite HOT 4
- typo in 4.14 CHANGELOG.md and CONTRIBUTING.md HOT 3
- OpenTelemetry Support HOT 16
- kubelet metrics not working in after upgrade to OKD 4.13 HOT 12
- wrong annotation for ThanosRulerConfig.Resources HOT 1
- I can't increase Prometheus startupProbe failureThreshold value HOT 6
- user-workload-monitoring doesn't support honoring labels HOT 4
- Additional Scrape Configuration is not supported HOT 8
- How to change default servicemonitors interval HOT 5
- Support enableRemoteWriteReceiver flag in prometheus{,K8s} config HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cluster-monitoring-operator.