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

Creating a firewall from CLI fails with "Error: DatabaseNetworkNotFoundError: Failed to find the network within the internal database" #330

Closed
kaihoffman opened this issue Jul 14, 2023 · 1 comment
Assignees

Comments

@kaihoffman
Copy link
Member

@andyjeffries reported the following trying to create a new firewall using the CLI. The same action to create a firewall in the default network worked on the web, meaning it's likely a CLI issue? CLI Version 1.0.59.

 15:55 ~ $ civo networks ls
+--------------------------------------+---------+--------+---------+--------+
| ID                                   | Label   | Region | Default | Status |
+--------------------------------------+---------+--------+---------+--------+
| 2fa8bd41-8de8-462e-84b9-a87dccaf3b0e | default | LON1   | true    | Active |
+--------------------------------------+---------+--------+---------+--------+
 15:55 ~ $ civo firewall create Kubernetes
Please check if you are using the latest version of CLI and retry the command
If you are still facing issues, please report it on our community slack or open a GitHub issue
Error: DatabaseNetworkNotFoundError: Failed to find the network within the internal database

Thinking this might be some sort of legacy network issue, I asked Andy to try the same thing on PHX1, a region he has never used before and which wouldn't have a default network before he switches to it:

16:02 ~ $ civo region current PHX1
The default region was set to (Phoenix 1) PHX1
 16:02 ~ $ civo networks ls
+--------------------------------------+---------+--------+---------+---------+
| ID                                   | Label   | Region | Default | Status  |
+--------------------------------------+---------+--------+---------+---------+
| 3c5e7f57-4513-4ba6-9527-0b3ef6aeceae | default | PHX1   | true    | Pending |
+--------------------------------------+---------+--------+---------+---------+
 16:02 ~ $ NETWORK_ID=`civo networks ls -o custom -f id`
 16:02 ~ $ echo $NETWORK_ID
3c5e7f57-4513-4ba6-9527-0b3ef6aeceae
 16:03 ~ $ civo firewall create Kubernetes -n $NETWORK_ID
Please check if you are using the latest version of CLI and retry the command
If you are still facing issues, please report it on our community slack or open a GitHub issue
Error: DatabaseNetworkNotFoundError: Failed to find the network within the internal database

However, the issue was not the obvious one (the status as Pending), because once the network appeared active the same error persisted.

 16:03 ~ $ civo networks ls
+--------------------------------------+---------+--------+---------+--------+
| ID                                   | Label   | Region | Default | Status |
+--------------------------------------+---------+--------+---------+--------+
| 3c5e7f57-4513-4ba6-9527-0b3ef6aeceae | default | PHX1   | true    | Active |
+--------------------------------------+---------+--------+---------+--------+
 16:03 ~ $ civo firewall create Kubernetes -n $NETWORK_ID
Please check if you are using the latest version of CLI and retry the command

I was not able to replicate this on my setup, but something is clearly erroring. Is the DatabaseNetworkNotFoundError masking something else?

@haardikdharma10
Copy link
Contributor

This should not be an issue anymore in the latest version of the CLI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants