make fails
mjudeikis opened this issue · comments
Mangirdas Judeikis commented
Make fails with permissions error:
[mjudeiki@localhost managed-cluster-config]$ make
rm -rf /home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/hack/00-osd-managed-cluster-config.selectorsyncset.yaml.tmpl
make[1]: Entering directory '/home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/deploy/resource-quotas'
make[1]: Leaving directory '/home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/deploy/resource-quotas'
make[1]: Entering directory '/home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/deploy/resource-quotas'
make[1]: Leaving directory '/home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/deploy/resource-quotas'
# The html goes into a secret. if it's too big, it can't be updated so break it into one secret per html.
# Each SSS must not be too big as well. each sub-dir of deploy/ becomes a SSS. therefore each of the html
# becomes a separate dir. This is a k8s limitation for annotation value size.
for TYPE in login providers errors; do \
oc --config=.kubeconfig create secret generic osd-oauth-templates-$TYPE -n openshift-config --from-file=$TYPE.html=source/html/$TYPE.html --dry-run -o
yaml > deploy/osd-oauth-templates-$TYPE/osd-oauth-templates-$TYPE.secret.yaml; \
done
if [ -z ]; then \
docker run --rm -v `pwd -P`:`pwd -P` python:2.7.15 /bin/sh -c "cd `pwd`; pip install oyaml; scripts/generate_syncset.py -t scripts/templates/ -y deplo
y -d /home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/hack/00-osd-managed-cluster-config.selectorsyncset.yaml.tmpl -r managed-cluster-con
fig"; \
else \
scripts/generate_syncset.py -t scripts/templates/ -y deploy -d /home/mjudeiki/go1.11/src/github.com/openshift/managed-cluster-config/hack/00-osd-manag
ed-cluster-config.selectorsyncset.yaml.tmpl -r managed-cluster-config; \
fi
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A f
uture version of pip will drop support for Python 2.7.
Collecting oyaml
Downloading https://files.pythonhosted.org/packages/00/37/ec89398d3163f8f63d892328730e04b3a10927e3780af25baf1ec74f880f/oyaml-0.9-py2.py3-none-any.whl
Collecting pyyaml (from oyaml)
Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)
Building wheels for collected packages: pyyaml
Building wheel for pyyaml (setup.py): started
Building wheel for pyyaml (setup.py): finished with status 'done'
Stored in directory: /root/.cache/pip/wheels/d9/45/dd/65f0b38450c47cf7e5312883deb97d065e030c5cca0a365030
Successfully built pyyaml
Installing collected packages: pyyaml, oyaml
Successfully installed oyaml-0.9 pyyaml-5.1.2
You are using pip version 19.0.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
/bin/sh: 1: scripts/generate_syncset.py: Permission denied
make: *** [Makefile:41: generate-syncset] Error 126
[mjudeiki@localhost managed-cluster-config]$ cat /etc/fedora-release
Fedora release 30 (Thirty)
Christoph Blecker commented
I'm guessing that scripts/generate_syncset.py
doesn't have an executable bit? It does in the repo, so I'm guessing it's a local FS issue?
Either way, try setting export IN_DOCKER_CONTAINER=y
and then re-running. That should run it in a docker container, instead of your local python.
Mangirdas Judeikis commented
yes, works. Thanks