-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
The default workspace at path terraform/sandbox/atlantis is currently locked by another command that is running for this pull request. #4302
Comments
Waiting for response |
atlantis, version? VCS? atlantis.yaml, repo config? we need to see how you configured it |
and check this: #4192
…On Sat, Mar 2, 2024 at 8:57 AM genfemme ***@***.***> wrote:
Waiting for response
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERDA2U2JHUABYSR4RODYWIAG7AVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUHA2TANRVGM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
atlantis:v0.24.2 This is the atlantis.yaml file -
This is the repo.config
|
waiting for response |
have you tried to update atlantis? |
What version are you suggesting? |
latest, 0.27.1 |
Are there any breaking changes in Atlantis v0.27.1 that would require modifications to our existing atlantis.yaml or repository configuration files? |
it should work fine.
you could try any of the 26 versions too before changing to 27.
check the release changelog to make sure.
…On Mon, Mar 4, 2024 at 10:59 AM genfemme ***@***.***> wrote:
Are there any breaking changes in Atlantis v0.27.1 that would require
modifications to our existing atlantis.yaml or repository configuration
files?
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERBWLU47D4QQXALBFYLYWTACRAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZXGI2TOOBYGA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I updated the image to Atlantis v0.27.1 but still getting the same error.
Please can you suggest on how to proceed with this? |
you always have this issue?
when you say persistent as in for all repos, only one?
are you trying to run atlantis plan manually after a PR push before waiting
for autoplan to run?
try disabling parallel plans and see if it works.
…On Wed, Mar 13, 2024 at 9:01 AM genfemme ***@***.***> wrote:
I updated the image to Atlantis v0.27.1 but still getting the same error.
Following are the details -
the sandbox workspace at path terraform/sandbox is currently locked by
another command that is running for this pull request. Wait until the
previous command is complete and try again
[DBUG] Building plan command for all affected projects [DBUG] 3 files were
modified in this pull request. Modified files: [atlantis.yaml
server-atlantis.yaml terraform/_env/base.hcl] [DBUG] got workspace lock
[INFO] successfully parsed atlantis.yaml file [DBUG] moduleInfo for
/home/atlantis/.atlantis/repos/AdharaProjects/terraform-sandbox/14/default
(matching "") = map[] [DBUG] found downstream projects for "atlantis.yaml":
[] [DBUG] found downstream projects for "server-atlantis.yaml": [] [DBUG]
found downstream projects for "terraform/_env/base.hcl": [] [DBUG] checking
if project at dir "terraform/sandbox" workspace "sandbox" was modified
[DBUG] file "terraform/_env/base.hcl" matched pattern [INFO] 1 projects are
to be planned based on their when_modified config [DBUG] determining config
for project at dir: "terraform/sandbox" workspace: "sandbox" [DBUG]
MergeProjectCfg started [DBUG] setting repo_locking: true from default
server config [DBUG] setting policy_check: false from default server config
[DBUG] setting plan_requirements: [] from default server config [DBUG]
setting workflow: "default" from repos[1], id: /.*/ [DBUG] setting
delete_source_branch_on_merge: false from default server config [DBUG]
setting allow_custom_workflows: true from repos[1], id: /.*/ [DBUG] setting
custom_policy_check: false from default server config [DBUG] setting
apply_requirements: [approved] from repos[1], id: /.*/ [DBUG] setting
import_requirements: [] from default server config [DBUG] setting
allowed_overrides: [apply_requirements,workflow] from repos[1], id: /.*/
[DBUG] MergeProjectCfg completed [DBUG] overriding server-defined workflow
with repo-specified workflow: "terragrunt" [DBUG] MergeProjectCfg completed
[DBUG] final settings: plan_requirements: [], apply_requirements:
[approved], import_requirements: [], workflow: terragrunt [DBUG] Building
project command context for plan [DBUG] deleting previous plans and locks
[INFO] acquired lock with id
"AdharaProjects/terraform-sandbox/terraform/sandbox/sandbox" [DBUG]
acquired lock for project [EROR] Error running plan operation: the sandbox
workspace at path terraform/sandbox is currently locked by another command
that is running for this pull request. Wait until the previous command is
complete and try again
Please can you suggest on how to proceed with this?
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERFPYIMKZLVMP7FMUFDYYBZ5JAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJUG44DONJQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This is the first deployment in this repo. This is the only repo that has atlantis deployed. I have also tried to unlock via the URL manually and by running atlantis unlock in the github PR and the issue remans the same. I haven't set any parallel plans and to avoid this. I amended the file as per below - `version: 3
workflows: And this is the server side config again - I also added this in the repo - server-atlantis.yaml
|
so the unlock command was changed recently and a fix was pushed to 0.27.2 so if you run unlock it will actually clear the workspace and any locks. and you could disable https://www.runatlantis.io/docs/server-configuration.html#parallel-plan |
It does clear the locks as per this comment that I receive in this PR - Also the URL doesn't show any locks. But when I run the plan again manually by adding altantis plan or via a new PR I get the same error. Are you suggesting to update the version to this now -0.27.2 to fix the issue? |
it will fix the unlock issue ( the message of removing the lock is
misleading)
…On Wed, Mar 13, 2024 at 10:18 AM genfemme ***@***.***> wrote:
It does clear the locks as per this comment that I receive in this PR -
All Atlantis locks for this PR have been unlocked and plans discarded
Also the URL doesn't show any locks.
But when I run the plan again manually by adding altantis plan or via a
new PR I get the same error.
Are you suggesting to update the version to this now -0.27.2 to fix the
issue?
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERAN5A2CCRZTXPF644TYYCC6NAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVGA2TMNZYGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Ok thanks I will update the image version and will add an update here after it is done. |
Still getting the error with 0.27.2 - `the sandbox workspace at path terraform/sandbox is currently locked by another command that is running for this pull request.
|
if you disable autoplan, can you plan manually?
…On Wed, Mar 13, 2024 at 2:20 PM genfemme ***@***.***> wrote:
Still getting the error with 0.27.2 -
`the sandbox workspace at path terraform/sandbox is currently locked by
another command that is running for this pull request.
Wait until the previous command is complete and try again
[DBUG] Building plan command for all affected projects [DBUG] 3 files were
modified in this pull request. Modified files: [atlantis.yaml
server-atlantis.yaml terraform/_env/base.hcl] [DBUG] got workspace lock
[INFO] successfully parsed atlantis.yaml file [DBUG] moduleInfo for
/home/atlantis/.atlantis/repos/AdharaProjects/terraform-sandbox/16/default
(matching "") = map[] [DBUG] found downstream projects for "atlantis.yaml":
[] [DBUG] found downstream projects for "server-atlantis.yaml": [] [DBUG]
found downstream projects for "terraform/_env/base.hcl": [] [DBUG] checking
if project at dir "terraform/sandbox" workspace "sandbox" was modified
[DBUG] file "terraform/_env/base.hcl" matched pattern [INFO] 1 projects are
to be planned based on their when_modified config [DBUG] determining config
for project at dir: "terraform/sandbox" workspace: "sandbox" [DBUG]
MergeProjectCfg started [DBUG] setting repo_locking: true from default
server config [DBUG] setting policy_check: false from default server config
[DBUG] setting plan_requirements: [] from default server config [DBUG]
setting import_requirements: [] from default server config [DBUG] setting
workflow: "default" from repos[1], id: /.*/ [DBUG] setting
allowed_overrides: [apply_requirements,workflow] from repos[1], id: /.*/
[DBUG] setting apply_requirements: [approved] from repos[1], id: /.*/
[DBUG] setting allow_custom_workflows: true from repos[1], id: /.*/ [DBUG]
setting delete_source_branch_on_merge: false from default server config
[DBUG] setting custom_policy_check: false from default server config [DBUG]
MergeProjectCfg completed [DBUG] overriding server-defined workflow with
repo-specified workflow: "terragrunt" [DBUG] MergeProjectCfg completed
[DBUG] final settings: plan_requirements: [], apply_requirements:
[approved], import_requirements: [], workflow: terragrunt [DBUG] Building
project command context for plan [DBUG] deleting previous plans and locks
[INFO] acquired lock with id
"AdharaProjects/terraform-sandbox/terraform/sandbox/sandbox" [DBUG]
acquired lock for project [EROR] Error running plan operation: the sandbox
workspace at path terraform/sandbox is currently locked by another command
that is running for this pull request. Wait until the previous command is
complete and try again
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERH4KDGPI2TWH3TW5G3YYC7IFAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJVHA3DAOJSGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Autoplan just hangs. The logs are when I run it manually using the below command in the github PR |
after doing the atlantis unlock |
Do you have any more suggestions please to resolve the issue? |
I will try asking on the slack channel to see if someone else have a
similar issue.
and I will disable autoplan and try with it first.
…On Thu, Mar 14, 2024, 7:45 a.m. genfemme ***@***.***> wrote:
Do you have any more suggestions please to resolve the issue?
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERAGH2LIIJDGSHUSIBTYYGZYFAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJXGYZDMMZZHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Did anyone mentioned the similar issue in the slack channel? |
waiting for response |
anyone? |
did you closed the PR and reopen again? when you do that Atlantis will clear the PR clone |
Yes I have closed and reopen PR couple of times already. Closing the PR does clears the clone. When I run the atlantis plan again I get the same error |
are you running from docker? I'm wondering if you have bad permissions on
the Atlantis-data dir, have you wiped the install and started again ?
…On Wed, Apr 3, 2024, 2:25 a.m. genfemme ***@***.***> wrote:
Yes I have closed and reopen PR couple of times already. Closing the PR
does clears the clone. When I run the atlantis plan again I get the same
error
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERF2AUI46SMM3YB6CBDY3PDJJAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGAZDQNZUGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I was looking at your atlantis.yaml and I saw this : ```- name: cluster
dir: terraform/sandbox/cluster
terraform_version: v1.6.6
workflow: terragrunt
workspace: cluster
autoplanP:
enabled: true```
do you autogenerate this?
there is typo on the file, autoplanP should be autoplan.
On Wed, Apr 3, 2024 at 7:42 AM Pepe (Jose) Amengual ***@***.***>
wrote:
… are you running from docker? I'm wondering if you have bad permissions on
the Atlantis-data dir, have you wiped the install and started again ?
On Wed, Apr 3, 2024, 2:25 a.m. genfemme ***@***.***> wrote:
> Yes I have closed and reopen PR couple of times already. Closing the PR
> does clears the clone. When I run the atlantis plan again I get the same
> error
>
> —
> Reply to this email directly, view it on GitHub
> <#4302 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAQ3ERF2AUI46SMM3YB6CBDY3PDJJAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZUGAZDQNZUGQ>
> .
> You are receiving this because you were mentioned.Message ID:
> ***@***.***>
>
|
I changed the file with the details here - #4302 (comment) |
Yes I have |
I am also experiencing this when i switched from github user authentication to github application auth |
so you are saying tht by switching you star seeing the issue but before
when using webhooks you did not?
…On Tue, Apr 16, 2024 at 5:32 AM dbg-raghulkrishna ***@***.***> wrote:
I am also experiencing this when i switched from github user
authentication to github application auth
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3EREEP2BKVOZ2M75BMLDY5UK6HAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJYHE3TSNZRGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
yes it did not happen before , from last week it is happening after switching to githun app, it is even happening for the changes in the folder that's not included in the projects |
example log |
did you try updating the app permissions? try to give all permissions to
test and see if it works, you might be might be missing something.
…On Wed, Apr 17, 2024 at 5:18 AM dbg-raghulkrishna ***@***.***> wrote:
example log
This happens only with github app authentication
Error running pre-workflow hooks the default workspace at path . is
currently locked by another command that is running for this pull
request.\nWait until the previous command is complete and try
again.","json":{"repo":"","pull":""},"stacktrace":"
github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand\n\tgh.neting.cc/runatlantis/atlantis/server/events/command_runner.go:340
<http://github.com/runatlantis/atlantis/server/events.(*DefaultCommandRunner).RunCommentCommand%5Cn%5Ctgh.neting.cc/runatlantis/atlantis/server/events/command_runner.go:340>
"}
—
Reply to this email directly, view it on GitHub
<#4302 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAQ3ERCDMIAUCIDRIVVHN7TY5ZSBPAVCNFSM6AAAAABEBRHTZGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGEZDONBSG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@lukemassa do you have any ideas of what else it could be? |
I will close this since I think we exhausted many of the possible issues. |
Community Note
Overview of the Issue
"I am experiencing a persistent issue where Atlantis reports that the default workspace is locked due to another command. Despite using atlantis unlock, the issue persists, preventing any new plans or applies."
Reproduction Steps
Error details
`Ran Plan for dir: terraform/sandbox/atlantis workspace: default
Plan Error
The default workspace at path terraform/sandbox/atlantis is currently locked by another command that is running for this pull request.
Wait until the previous command is complete and try again.`
Logs
The text was updated successfully, but these errors were encountered: