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

Provisioning app tries to create the project again just after successfully creating the project #715

Open
BraisVQ opened this issue Jan 18, 2022 · 10 comments
Labels
bug Something isn't working

Comments

@BraisVQ
Copy link
Contributor

BraisVQ commented Jan 18, 2022

Describe the bug
Once we create the project with the Prov-app successfully, we can see in the logs that it tries to create it again and the preconditions fail as it has already been created.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy prov-app from 4.x tag in Dockerhub
  2. Create a project with specialPermissionSet=true (with groups for read, write, admin and cdUser)
  3. Check the logs

Expected behavior
After the project creation, the prov-app sholuld not try to create the project again

Affected version:

  • OpenShift: [4.8]
  • OpenDevStack [4.x]

Log Output

2022-01-18 16:24:59 loggerFileName=DUMS2 [http-nio-8080-exec-6] DEBUG o.o.p.c.ProjectApiController - Project DUMS2 successfully stored: /opt/provision/history/20220118162459-DUMS2.txt
2022-01-18 16:24:59 loggerFileName=DUMS2 [http-nio-8080-exec-6] DEBUG o.o.provision.services.MailAdapter - Mail for project: DUMS2 sent
2022-01-18 16:24:59 loggerFileName=DUMS2 [http-nio-8080-exec-10] DEBUG o.o.p.s.CrowdProjectIdentityMgmtAdapter - existsGroupWithName by Name took (ms): 513
2022-01-18 16:24:59 loggerFileName=DUMS2 [http-nio-8080-exec-10] DEBUG o.o.p.s.CrowdProjectIdentityMgmtAdapter - findPrincipal by Name took (ms): 494
2022-01-18 16:24:59 loggerFileName=DUMS2 [http-nio-8080-exec-10] DEBUG o.o.p.s.CrowdProjectIdentityMgmtAdapter - identityCheck Name took (ms): 2006
2022-01-18 16:24:59 loggerFileName=DUMS2 [http-nio-8080-exec-10] INFO o.o.provision.services.JiraAdapter - checking create project preconditions for project 'DUMS2'!
2022-01-18 16:25:02 loggerFileName=DUMS2 [http-nio-8080-exec-10] INFO o.o.p.c.ProjectApiController - Done with all create project preconditions checks for project but some checks failed! [project=DUMS2, failures=[CheckPreconditionFailure{error-code='PROJECT_EXISTS', detail='ProjectKey 'DUMS2' already exists in 'jira'!'}, CheckPreconditionFailure{error-code='PROJECT_EXISTS', detail='Project/Space 'DUMS2' already exists in 'confluence'!'}, CheckPreconditionFailure{error-code='PROJECT_EXISTS', detail='project 'DUMS2' already exists in bitbucket!'}]]!
@BraisVQ BraisVQ added the bug Something isn't working label Jan 18, 2022
@clemensutschig
Copy link
Member

clemensutschig commented Jan 18, 2022

Can you put the entire log of a project Provision call here.. this is a major regression @stitakis

Also what's the usecase? Do you use the UI (which one?) the API or?

@BraisVQ
Copy link
Contributor Author

BraisVQ commented Jan 19, 2022

@clemensutschig @stitakis
Here the log for a project we created yesterday in our DEV environment

We test it with the UI (the old one, with frontend.spa.enabled=false).

The problem is that it is running the preflight checks after the project was created successfully and this trace Done with all create project preconditions checks for project but some checks failed! appears in the logs.
This does not appear as an error in the UI, but if we create the project with API calls we capture this trace and breaks the current workflow.

@clemensutschig
Copy link
Member

@braisvq1996 - there must be more (the second request) ... check the overall log (and not the component specific one) ...

@clemensutschig
Copy link
Member

and you get the error back just via API? ... this is super weird, because the same API is used for the UI and the CURL interface

Can you check if you see something on the CALLER side

@BraisVQ
Copy link
Contributor Author

BraisVQ commented Jan 19, 2022

Now It I got the error also from the UI when creating a project....
I will prepare the overall log and put it here

Captura

This is the situation we are facing as the project is created successfully but we get an error in the preflight checks (it seems that it is trying to create the project twice from the logs)

@BraisVQ
Copy link
Contributor Author

BraisVQ commented Jan 19, 2022

We have created some projects with the UI, the script in ods-core and our provisioner client .

The project creation only gives us the error if we create it with the UI or the provisioner client (same as the last log provided), if we use the script in ods-core it works without problems

@stitakis
Copy link
Member

@braisvq1996 I'm not aware of any change that could cause a regression issue in the project provisioning flow. I'll take a look at the log file.

@stitakis
Copy link
Member

@braisvq1996 can you please verify in Jira when the project DUMS2 was created? The ProvApp pre flight condition checked this at 2022-01-18 16:24:59. At this point the project already existed.

@BraisVQ
Copy link
Contributor Author

BraisVQ commented Jan 20, 2022

@stitakis and me are taking a look into this issue

@stitakis
Copy link
Member

stitakis commented Mar 1, 2022

@braisvq1996 was you able to make any progress on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants