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

Issue Applying Templates Accessed Over HTTP #251

Closed
sherl0cks opened this issue Jan 29, 2019 · 4 comments · Fixed by #252
Closed

Issue Applying Templates Accessed Over HTTP #251

sherl0cks opened this issue Jan 29, 2019 · 4 comments · Fixed by #252

Comments

@sherl0cks
Copy link
Contributor

When I run:

ansible-galaxy install -r requirements.yml --roles-path=roles
ansible-playbook site.yml

I get the following failure:

TASK [openshift-applier/roles/openshift-applier : Create OpenShift objects based on template with params for 'projectrequest : labs-ci-cd-2'] ********************************************************************************************************************************************
failed: [projects-and-policies] (item={'oc_path': ''}) => {"changed": true, "cmd": "oc process   https://raw.githubusercontent.com/redhat-cop/cluster-lifecycle/v3.9.0/files/projectrequest/template.yml   --param='NAMESPACE=labs-ci-cd-2' --param='NAMESPACE_DISPLAY_NAME=labs-ci-cd-2'--param='SECRET_NAME=ci-cd-secret'  --ignore-unknown-parameters | oc create  -f - ", "delta": "0:00:00.216668", "end": "2019-01-29 09:55:58.853071", "failed_when_result": true, "msg": "non-zero return code", "oc_param_file_item": {"oc_path": ""}, "rc": 1, "start": "2019-01-29 09:55:58.636403", "stderr": "error: invalid argument \"https://raw.githubusercontent.com/redhat-cop/cluster-lifecycle/v3.9.0/files/projectrequest/template.yml\"\nerror: no objects passed to create", "stderr_lines": ["error: invalid argument \"https://raw.githubusercontent.com/redhat-cop/cluster-lifecycle/v3.9.0/files/projectrequest/template.yml\"", "error: no objects passed to create"], "stdout": "", "stdout_lines": []}

Root cause appears to be that the oc process command is missing -f. Unclear if that is labs-ci-cd or a bug in the applier.

@mcanoy
Copy link
Contributor

mcanoy commented Jan 29, 2019

I'm not experience this I ran the above commands with modified project names and did not see this (fails because I wasn't logged in but succeed without messaging after login)

TASK [openshift-applier/roles/openshift-applier : Create OpenShift objects based on template with params for 'projectrequest : k-ci-cd'] ****
failed: [projects-and-policies] (item={'oc_path': u''}) => {"changed": true, "cmd": "oc process  --local  -f https://raw.githubusercontent.com/redhat-cop/cluster-lifecycle/v3.9.0/files/projectrequest/template.yml   --param='NAMESPACE=k-ci-cd' --param='SECRET_NAME=ci-cd-secret' --param='NAMESPACE_DISPLAY_NAME=k-ci-cd'  --ignore-unknown-parameters | oc create  -f - ", "delta": "0:00:02.172337", "end": "2019-01-29 09:04:55.936402", "failed_when_result": true, "msg": "non-zero return code", "oc_param_file_item": {"oc_path": ""}, "rc": 1, "start": "2019-01-29 09:04:53.764065", "stderr": "error: You must be logged in to the server (Unauthorized)", "stderr_lines": ["error: You must be logged in to the server (Unauthorized)"], "stdout": "", "stdout_lines": []}

Using

ansible 2.5.4 
oc v3.10.14
master branch
Mac OSX

@sherl0cks
Copy link
Contributor Author

sherl0cks commented Jan 29, 2019

Looks like we are hitting redhat-cop/openshift-applier#91, which seems tied to ansible 2.7.5. Downgrading ansible does not solve this.

@oybed
Copy link
Contributor

oybed commented Jan 29, 2019

You can downgrade if required to run "locally", or you can use the openshift-applier container.

@sherl0cks
Copy link
Contributor Author

For context, redhat-cop/openshift-applier#106 resolved the issue in the applier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants