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

Error running start-build on at least one item: [buildconfig/tasks]; #106

Open
wipro-sdx opened this issue Oct 24, 2018 · 3 comments
Open

Comments

@wipro-sdx
Copy link

Hi Team,

Build Image tasks fails in CICD pipeline on openshift 3.9.

following is the error messages

Error running start-build on at least one item: [buildconfig/tasks];

{reference={}, err=Uploading directory "oc-build" as binary input for the build ...

.

Uploading finished

error: The build dev/tasks-2 status is "Failed", verb=start-build, cmd=oc --server=https://172.30.0.1:443 --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --namespace=dev --token=XXXXX start-build buildconfig/tasks --from-dir=oc-build --wait=true -o=name , out=build.build.openshift.io/tasks-2, status=1}

@siamaksade
Copy link
Owner

Where there any more info in the events or build logs?

@andresmmujica
Copy link

Hi Siam, I'm having the same issue here, look at the logs I've got:

<ERROR: Error running start-build on at least one item: [buildconfig/tasks];
{reference={}, err=Uploading file "target/ROOT.war" as binary input for the build ...
Error from server (InternalError): Internal error occurred: pods "tasks-2-build" is forbidden: cannot exec into or attach to a privileged container
, verb=start-build, cmd=oc --server=https://172.30.0.1:443 --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --namespace=dev-aro --token=XXXXX start-build buildconfig/tasks --from-file=target/ROOT.war --wait=true -o=name , out=, status=1}

Finished: FAILURE>

@andresmmujica
Copy link

I'm using ARO (Azure Red Hat Openshift) and perhaps it's related to the access allowed to the pods?

if I try to log to the building pod as soon as it starts I get this error:

oc rsh tasks-5-build

Error from server (Forbidden): pods "tasks-5-build" is forbidden: exec operation is not allowed because the pod's security context exceeds your permissions: pods "tasks-5-build" is forbidden: unable to validate against any security context constraint: [spec.volumes[1]: Invalid value: "hostPath": hostPath volumes are not allowed to be used spec.volumes[2]: Invalid value: "hostPath": hostPath volumes are not allowed to be used spec.containers[0].securityContext.privileged: Invalid value: true: Privileged containers are not allowed]

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

No branches or pull requests

3 participants