cli
cli copied to clipboard
Creating a firewall from CLI fails with "Error: DatabaseNetworkNotFoundError: Failed to find the network within the internal database"
@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?