abra seems to ignore --no-domain-checks on abra app deploy #495

Closed
opened 2023-09-28 21:05:57 +00:00 by cas · 6 comments
Owner

Sorry for the messy traceback. If nobody gets to it I'll take a look at this bug at some point and try to recreate. I've run into this a bunch.

DEBU[0002] read map[DOMAIN:drone-docker-runner.example.com DRONE_RPC_HOST:drone.example.com LETS_ENCRYPT_ENV:production RPC_SECRET_VERSION:v1 TYPE:drone-docker-runner] from /home/f/.abra/recipes/drone-docker-runner/.env.sample  ca[86/347]
bra/pkg/config/env.go:51 ReadEnv"
DEBU[0002] linting successful, drone-docker-runner is well configured  caller="/abra/pkg/lint/recipe.go:193 LintForErrors"
DEBU[0002] checking whether drone-docker-runner_dronehive_autonomic_zone is already deployed  caller="/abra/cli/app/deploy.go:81 glob..func6"
DEBU[0002] drone-docker-runner_dronehive_autonomic_zone has been detected as not deployed  caller="/abra/pkg/upstream/stack/stack.go:124 IsDeployed"
DEBU[0002] read global ignore paths: .DS_Store *.swp *.swo *.pyc /doc/tags /.envrc .~*#  caller="/abra/pkg/git/read.go:162 parseExcludesFile"
DEBU[0002] discovered clean git status in /home/f/.abra/catalogue  caller="/abra/pkg/git/read.go:65 IsClean"
DEBU[0002] successfully checked out refs/heads/main in /home/f/.abra/catalogue  caller="/abra/pkg/git/branch.go:97 CheckoutDefaultBranch"
DEBU[0003] fetched latest git changes for /home/f/.abra/catalogue  caller="/abra/pkg/catalogue/catalogue.go:129 EnsureUpToDate"
DEBU[0003] read recipe catalogue from file system cache in /home/f/.abra/catalogue/recipes.json  caller="/abra/pkg/recipe/recipe.go:709 readRecipeCatalogueFS"
DEBU[0003] choosing 1.1.2+1.8.3 as version to deploy     caller="/abra/cli/app/deploy.go:109 glob..func6"
DEBU[0003] read global ignore paths: .DS_Store *.swp *.swo *.pyc /doc/tags /.envrc .~*#  caller="/abra/pkg/git/read.go:162 parseExcludesFile"
DEBU[0003] discovered clean git status in /home/f/.abra/recipes/drone-docker-runner  caller="/abra/pkg/git/read.go:65 IsClean"
DEBU[0003] read 1.0.0+1.6.3, 1.1.0+1.8.1, 1.1.1+1.8.2, 1.1.2+1.8.3 as tags for recipe drone-docker-runner  caller="/abra/pkg/recipe/recipe.go:321 EnsureVersion"
DEBU[0003] successfully checked drone-docker-runner out to 1.1.2+1.8.3 in /home/f/.abra/recipes/drone-docker-runner  caller="/abra/pkg/recipe/recipe.go:341 EnsureVersion"
DEBU[0003] read global ignore paths: .DS_Store *.swp *.swo *.pyc /doc/tags /.envrc .~*#  caller="/abra/pkg/git/read.go:162 parseExcludesFile"
DEBU[0003] discovered clean git status in /home/f/.abra/recipes/drone-docker-runner  caller="/abra/pkg/git/read.go:65 IsClean"
DEBU[0003] read 1.0.0+1.6.3, 1.1.0+1.8.1, 1.1.1+1.8.2, 1.1.2+1.8.3 as tags for recipe drone-docker-runner  caller="/abra/pkg/recipe/recipe.go:321 EnsureVersion"
DEBU[0003] successfully checked drone-docker-runner out to 1.1.2+1.8.3 in /home/f/.abra/recipes/drone-docker-runner  caller="/abra/pkg/recipe/recipe.go:341 EnsureVersion"
DEBU[0003] read map[ENV_VERSION:v1] from /home/f/.abra/recipes/drone-docker-runner/abra.sh  caller="/abra/pkg/config/env.go:158 ReadAbraShEnvVars"
DEBU[0003] no COMPOSE_FILE detected, loading compose.yml  caller="/abra/pkg/config/app.go:446 GetAppComposeFiles"
DEBU[0003] retrieved /home/f/.abra/recipes/drone-docker-runner/compose.yml for drone-docker-runner.dronehive.autonomic.zone  caller="/abra/pkg/config/app.go:474 GetAppComposeConfig"
DEBU[0003] Add the following environment to the app service config of drone-docker-runner_dronehive_autonomic_zone:  caller="/abra/pkg/config/app.go:483 ExposeAllEnv"
DEBU[0003] Add Key: DOMAIN Value: drone-docker-runner.dronehive.autonomic.zone to drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:489 ExposeAllEnv"
DEBU[0003] Add Key: STACK_NAME Value: drone-docker-runner_dronehive_autonomic_zone to drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:489 ExposeAllEnv"
DEBU[0003] Add Key: ENV_VERSION Value: v1 to drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:489 ExposeAllEnv"
DEBU[0003] Add Key: LETS_ENCRYPT_ENV Value: production to drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:489 ExposeAllEnv"
DEBU[0003] Add Key: RPC_SECRET_VERSION Value: v1 to drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:489 ExposeAllEnv"
DEBU[0003] Add Key: TYPE Value: drone-docker-runner to drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:489 ExposeAllEnv"
DEBU[0003] set recipe label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.recipe' to drone-docker-runner for drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:501 SetRecipeLabel"
DEBU[0003] set label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.chaos' to false for drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:513 SetChaosLabel"
DEBU[0003] set label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.chaos-version' to 1.1.2+1.8.3 for drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:524 SetChaosVersionLabel"
DEBU[0003] set label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.autoupdate' to false for drone-docker-runner_dronehive_autonomic_zone  caller="/abra/pkg/config/app.go:541 SetUpdateLabel"
+--------------------------+---------------------+-------------+----------------------------------------------+-------------+
|          SERVER          |       RECIPE        |   CONFIG    |                    DOMAIN                    |   VERSION   |
+--------------------------+---------------------+-------------+----------------------------------------------+-------------+
| dronehive.autonomic.zone | drone-docker-runner | compose.yml | drone-docker-runner.dronehive.autonomic.zone | 1.1.2+1.8.3 |
+--------------------------+---------------------+-------------+----------------------------------------------+-------------+
? continue with deployment? Yes
FATA[0003] lookup drone-docker-runner.dronehive.autonomic.zone: no such host  caller="/abra/cli/app/deploy.go:186 glob..func6" stack="/abra/cli/app/deploy.go:186                              glob..func6\n/go/pkg/mod/github.com/urfave/cli@
v1.22.9/app.go:524     HandleAction\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:173 Command.Run\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:405     (*App).RunAsSubcommand\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.
go:378 Command.startApp\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:102 Command.Run\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:277     (*App).Run\n/abra/cli/cli.go:200                                     RunApp\n/abra/cmd
/abra/main.go:22                                main\n/usr/local/go/src/runtime/proc.go:250                    main\n/usr/local/go/src/runtime/asm_amd64.s:1594               goexit"
Sorry for the messy traceback. If nobody gets to it I'll take a look at this bug at some point and try to recreate. I've run into this a bunch. ``` DEBU[0002] read map[DOMAIN:drone-docker-runner.example.com DRONE_RPC_HOST:drone.example.com LETS_ENCRYPT_ENV:production RPC_SECRET_VERSION:v1 TYPE:drone-docker-runner] from /home/f/.abra/recipes/drone-docker-runner/.env.sample ca[86/347] bra/pkg/config/env.go:51 ReadEnv" DEBU[0002] linting successful, drone-docker-runner is well configured caller="/abra/pkg/lint/recipe.go:193 LintForErrors" DEBU[0002] checking whether drone-docker-runner_dronehive_autonomic_zone is already deployed caller="/abra/cli/app/deploy.go:81 glob..func6" DEBU[0002] drone-docker-runner_dronehive_autonomic_zone has been detected as not deployed caller="/abra/pkg/upstream/stack/stack.go:124 IsDeployed" DEBU[0002] read global ignore paths: .DS_Store *.swp *.swo *.pyc /doc/tags /.envrc .~*# caller="/abra/pkg/git/read.go:162 parseExcludesFile" DEBU[0002] discovered clean git status in /home/f/.abra/catalogue caller="/abra/pkg/git/read.go:65 IsClean" DEBU[0002] successfully checked out refs/heads/main in /home/f/.abra/catalogue caller="/abra/pkg/git/branch.go:97 CheckoutDefaultBranch" DEBU[0003] fetched latest git changes for /home/f/.abra/catalogue caller="/abra/pkg/catalogue/catalogue.go:129 EnsureUpToDate" DEBU[0003] read recipe catalogue from file system cache in /home/f/.abra/catalogue/recipes.json caller="/abra/pkg/recipe/recipe.go:709 readRecipeCatalogueFS" DEBU[0003] choosing 1.1.2+1.8.3 as version to deploy caller="/abra/cli/app/deploy.go:109 glob..func6" DEBU[0003] read global ignore paths: .DS_Store *.swp *.swo *.pyc /doc/tags /.envrc .~*# caller="/abra/pkg/git/read.go:162 parseExcludesFile" DEBU[0003] discovered clean git status in /home/f/.abra/recipes/drone-docker-runner caller="/abra/pkg/git/read.go:65 IsClean" DEBU[0003] read 1.0.0+1.6.3, 1.1.0+1.8.1, 1.1.1+1.8.2, 1.1.2+1.8.3 as tags for recipe drone-docker-runner caller="/abra/pkg/recipe/recipe.go:321 EnsureVersion" DEBU[0003] successfully checked drone-docker-runner out to 1.1.2+1.8.3 in /home/f/.abra/recipes/drone-docker-runner caller="/abra/pkg/recipe/recipe.go:341 EnsureVersion" DEBU[0003] read global ignore paths: .DS_Store *.swp *.swo *.pyc /doc/tags /.envrc .~*# caller="/abra/pkg/git/read.go:162 parseExcludesFile" DEBU[0003] discovered clean git status in /home/f/.abra/recipes/drone-docker-runner caller="/abra/pkg/git/read.go:65 IsClean" DEBU[0003] read 1.0.0+1.6.3, 1.1.0+1.8.1, 1.1.1+1.8.2, 1.1.2+1.8.3 as tags for recipe drone-docker-runner caller="/abra/pkg/recipe/recipe.go:321 EnsureVersion" DEBU[0003] successfully checked drone-docker-runner out to 1.1.2+1.8.3 in /home/f/.abra/recipes/drone-docker-runner caller="/abra/pkg/recipe/recipe.go:341 EnsureVersion" DEBU[0003] read map[ENV_VERSION:v1] from /home/f/.abra/recipes/drone-docker-runner/abra.sh caller="/abra/pkg/config/env.go:158 ReadAbraShEnvVars" DEBU[0003] no COMPOSE_FILE detected, loading compose.yml caller="/abra/pkg/config/app.go:446 GetAppComposeFiles" DEBU[0003] retrieved /home/f/.abra/recipes/drone-docker-runner/compose.yml for drone-docker-runner.dronehive.autonomic.zone caller="/abra/pkg/config/app.go:474 GetAppComposeConfig" DEBU[0003] Add the following environment to the app service config of drone-docker-runner_dronehive_autonomic_zone: caller="/abra/pkg/config/app.go:483 ExposeAllEnv" DEBU[0003] Add Key: DOMAIN Value: drone-docker-runner.dronehive.autonomic.zone to drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:489 ExposeAllEnv" DEBU[0003] Add Key: STACK_NAME Value: drone-docker-runner_dronehive_autonomic_zone to drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:489 ExposeAllEnv" DEBU[0003] Add Key: ENV_VERSION Value: v1 to drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:489 ExposeAllEnv" DEBU[0003] Add Key: LETS_ENCRYPT_ENV Value: production to drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:489 ExposeAllEnv" DEBU[0003] Add Key: RPC_SECRET_VERSION Value: v1 to drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:489 ExposeAllEnv" DEBU[0003] Add Key: TYPE Value: drone-docker-runner to drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:489 ExposeAllEnv" DEBU[0003] set recipe label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.recipe' to drone-docker-runner for drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:501 SetRecipeLabel" DEBU[0003] set label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.chaos' to false for drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:513 SetChaosLabel" DEBU[0003] set label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.chaos-version' to 1.1.2+1.8.3 for drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:524 SetChaosVersionLabel" DEBU[0003] set label 'coop-cloud.drone-docker-runner_dronehive_autonomic_zone.autoupdate' to false for drone-docker-runner_dronehive_autonomic_zone caller="/abra/pkg/config/app.go:541 SetUpdateLabel" +--------------------------+---------------------+-------------+----------------------------------------------+-------------+ | SERVER | RECIPE | CONFIG | DOMAIN | VERSION | +--------------------------+---------------------+-------------+----------------------------------------------+-------------+ | dronehive.autonomic.zone | drone-docker-runner | compose.yml | drone-docker-runner.dronehive.autonomic.zone | 1.1.2+1.8.3 | +--------------------------+---------------------+-------------+----------------------------------------------+-------------+ ? continue with deployment? Yes FATA[0003] lookup drone-docker-runner.dronehive.autonomic.zone: no such host caller="/abra/cli/app/deploy.go:186 glob..func6" stack="/abra/cli/app/deploy.go:186 glob..func6\n/go/pkg/mod/github.com/urfave/cli@ v1.22.9/app.go:524 HandleAction\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:173 Command.Run\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:405 (*App).RunAsSubcommand\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/command. go:378 Command.startApp\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/command.go:102 Command.Run\n/go/pkg/mod/github.com/urfave/cli@v1.22.9/app.go:277 (*App).Run\n/abra/cli/cli.go:200 RunApp\n/abra/cmd /abra/main.go:22 main\n/usr/local/go/src/runtime/proc.go:250 main\n/usr/local/go/src/runtime/asm_amd64.s:1594 goexit" ```
cas added the
bug
label 2023-09-28 21:05:57 +00:00
3wordchant added the
abra
label 2023-09-28 23:31:51 +00:00
Owner

@cas seems tested 906bf65d47/tests/integration/app_deploy.bats (L275-L298) 🤔 It is --no-domain-checks, not --no-domain? Altho I can confirm the CLI errors out if the wrong flag is passed, so I guess that wasn't it? Are you running latest release? The traceback points to a line in the file which has moved on since, so can't quite check that.

@cas seems tested https://git.coopcloud.tech/coop-cloud/abra/src/commit/906bf65d475ea7295ea3e27958a2b76c9bb1bde2/tests/integration/app_deploy.bats#L275-L298 🤔 It is `--no-domain-checks`, not `--no-domain`? Altho I can confirm the CLI errors out if the wrong flag is passed, so I guess that wasn't it? Are you running latest release? The traceback points to a line in the file which has moved on since, so can't quite check that.
Owner

Can confirm we were using --no-domain-checks. I'm on 5ae73f7, will try to reproduce with latest. The problem only seems to occur when there's an NXDOMAIN reply for the domain, if it resolves differently to the server then --no-domain-checks works fine

Can confirm we were using `--no-domain-checks`. I'm on `5ae73f7`, will try to reproduce with latest. The problem only seems to occur when there's an NXDOMAIN reply for the domain, if it resolves differently to the server then `--no-domain-checks` works fine
Owner

Oh, this is maybe an issue (from the traceback)?

@cas @3wordchant

DEBU[0002] read map[DOMAIN:drone-docker-runner.example.com DRONE_RPC_HOST:drone.example.com LETS_ENCRYPT_ENV:production RPC_SECRET_VERSION:v1 TYPE:drone-docker-runner] from /home/f/.abra/recipes/drone-docker-runner/.env.sample ca[86/347]

The drone-docker-runner.dronehive.autonomic.zone.env is misconfigured? Can you confirm?

I think abra is doing a ipv4 compare of drone-docker-runner.example.com and dronehive.autonomic.zone and failing then because drone-docker-runner.example.com does not exist?

I could try add a linting rule to check that the root of DOMAIN=... matches the root of the server domain? I hope Go stdlib has something for parsing domain names...

Oh, this is maybe an issue (from the traceback)? @cas @3wordchant > DEBU[0002] read map[DOMAIN:drone-docker-runner.example.com DRONE_RPC_HOST:drone.example.com LETS_ENCRYPT_ENV:production RPC_SECRET_VERSION:v1 TYPE:drone-docker-runner] from /home/f/.abra/recipes/drone-docker-runner/.env.sample ca[86/347] The `drone-docker-runner.dronehive.autonomic.zone.env` is misconfigured? Can you confirm? I think `abra` is doing a ipv4 compare of `drone-docker-runner.example.com` and `dronehive.autonomic.zone` and failing then because `drone-docker-runner.example.com` does not exist? I could try add a linting rule to check that the root of `DOMAIN=...` matches the root of the server domain? I hope Go stdlib has something for parsing domain names...
Owner

DEBU[0002] read map[DOMAIN:drone-docker-runner.example.com DRONE_RPC_HOST:drone.example.com LETS_ENCRYPT_ENV:production RPC_SECRET_VERSION:v1 TYPE:drone-docker-runner] from /home/f/.abra/recipes/drone-docker-runner/.env.sample ca[86/347]

The drone-docker-runner.dronehive.autonomic.zone.env is misconfigured? Can you confirm?

That's coming from the .env.sample no?

DOMAIN seems like it was correctly picked up, from the confirmation prompt box thing.

I think abra is doing a ipv4 compare of drone-docker-runner.example.com and dronehive.autonomic.zone and failing then because drone-docker-runner.example.com does not exist?

My impression of --no-domain-checks was that it shouldn't be checking addresses of anything, though!

> `DEBU[0002] read map[DOMAIN:drone-docker-runner.example.com DRONE_RPC_HOST:drone.example.com LETS_ENCRYPT_ENV:production RPC_SECRET_VERSION:v1 TYPE:drone-docker-runner] from /home/f/.abra/recipes/drone-docker-runner/.env.sample ca[86/347]` > > The drone-docker-runner.dronehive.autonomic.zone.env is misconfigured? Can you confirm? That's coming from the `.env.sample` no? `DOMAIN` seems like it was correctly picked up, from the confirmation prompt box thing. > I think abra is doing a ipv4 compare of drone-docker-runner.example.com and dronehive.autonomic.zone and failing then because drone-docker-runner.example.com does not exist? My impression of `--no-domain-checks` was that it shouldn't be checking addresses of anything, though!
Owner

That's coming from the .env.sample no? DOMAIN seems like it was correctly picked up, from the confirmation prompt box thing.

Ah right, yep!

My impression of --no-domain-checks was that it shouldn't be checking addresses of anything, though!

Sorry, yeh, I'm confusing the situation. As I (thought) found a related issue (coop-cloud/abra#360) and threw it in the mix here 😅

So, I'm snsure why the flag would be ignored then 🤔 If any other ideas pop up, lemme know 🤓

> That's coming from the .env.sample no? DOMAIN seems like it was correctly picked up, from the confirmation prompt box thing. Ah right, yep! > My impression of --no-domain-checks was that it shouldn't be checking addresses of anything, though! Sorry, yeh, I'm confusing the situation. As I (thought) found a related issue (https://git.coopcloud.tech/coop-cloud/abra/pulls/360) and threw it in the mix here 😅 So, I'm snsure why the flag would be ignored then 🤔 If any other ideas pop up, lemme know 🤓
decentral1se changed title from abra seems to ignore --no-domain on `abra app deploy` to abra seems to ignore --no-domain-checks on `abra app deploy` 2023-09-30 06:31:06 +00:00
Owner

I guess the "can reproduce" window for this has gone Very Far Away... please re-open if you run into it again! Unsure how to proceed otherwise...

I guess the "can reproduce" window for this has gone Very Far Away... please re-open if you run into it again! Unsure how to proceed otherwise...
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/organising#495
No description provided.