[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Why can't we delete a project with oc delete project



The project already exists (so you get the "already exists" error), and the dev user must not have permissions in it.

You'll need to delete it with a more highly privileged user like system:admin

On Sep 19, 2016, at 7:37 AM, Charles Moulliard <cmoullia redhat com> wrote:

Hi,

When I use these openshift oc client commands in a bash shell script, then I get this error

## Log on with the dev user, create the vertx project
Error from server: project "vertx-demo" already exists
## Add policies
Error from server: User "vertx-dev" cannot get policybindings in project "vertx-demo"
Error from server: User "vertx-dev" cannot get policybindings in project "vertx-demo"

Why can't we delete an existing project ? Is there a workaround ?

#!/usr/bin/env bash
oc logout
oc login -u admin -p admin
oc delete project vertx-demo
oc login -u vertx-dev -p devel
echo "## Log on with the dev user, create the vertx project"
oc new-project vertx-demo
echo "## Add policies"
oc policy add-role-to-user view vertx-dev -n vertx-demo
oc policy add-role-to-group view system:serviceaccounts -n vertx-demo

Regards,

Charles 
_______________________________________________
users mailing list
users lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]