1

I am using OpenShift Online Pro and am following the DevOps with OpenShift book example about multiple project jenkins pipelines that starts at page 43.

I am trying a second run through the example so I used the webconsole to delete all the projects. When I then try to recreate the projects using oc new-project production some of them fail to create with the error Error from server (AlreadyExists): project.project.openshift.io "production" already exists even though the project doesn't show up on the output of oc projects nor on the web console.

If I create and delete projects without following the steps in the book I get no problems and some projects don't have this problem. I happen to have two online pro accounts (a personal one and a collaboration). I can repeat the behaviour in the second online pro account.

It feels like that if I add the system:image-puller role to the service account of the project as per the book then delete the project it doesn't delete the service account. Then when I try to create deleted project afresh it fails as the service account is zombied:

oc policy add-role-to-group system:image-puller system:serviceaccounts:testing -n development
oc policy add-role-to-group system:image-puller system:serviceaccounts:production -n development

Is there something i can do to tidy up further any traces beyond deleting the project that can allow me to recreate the projects from the book example on OpenShift Online Pro?

simbo1905
  • 6,321
  • 5
  • 58
  • 86

1 Answers1

0

Projects are deleted asynchronously after you send the delete command. So it's possible that the deletion just hasn't been reconciled yet. It should happen within a minute or so, so try again.

Also, please be aware that in a multitenant environment, like OpenShift Online, you are prevented from creating a project with the same name as any other project in the cluster, even if it's not your own. So if you can't create the project, it's possible that someone has already created a project with the same name.

Will Gordon
  • 3,303
  • 2
  • 11
  • 22
  • nope six hour later still the same error message trying to create the project. – simbo1905 Jan 11 '18 at 19:39
  • So, as mentioned above, this project name is likely already taken. Please feel free to select another project name, variations on your username are a typical good option. – Will Gordon Jan 11 '18 at 23:14
  • i am on a shared cluster trying to automate the creation of test envs and i find that i cannot use names like "demo", "test" or the like i now have to figure out how to namespace things in a way that won't collide with other people. as a paying customer of openshift online with a scrum team of collaborators who has cranked up a the billing to do a product build I am expecting a multi-tenant public cloud like openshift online not to cause collisions with random other companies or hobby users. we have a full scrum team on this platform and this is going to break 12factor for us. epic fail. – simbo1905 Jan 12 '18 at 09:45
  • If this is automated, I would suggest appending/prepending your username to the projects. E.g., simbo1905-demo, simbo1905-test to ensure you're not hitting collisions. OpenShift provides a single tenant offering, [OpenShift Dedicated](https://www.openshift.com/dedicated/), as well. Also, as a paying customer, you have access to [Red Hat support](https://access.redhat.com/support) for questions like this and also for help requesting a Request for Enhancement. – Will Gordon Jan 12 '18 at 11:12