fix: enable faster db recovery (#1020)
diff --git a/roles/nova/vars/main.yml b/roles/nova/vars/main.yml
index 1b9c802..b7a93c2 100644
--- a/roles/nova/vars/main.yml
+++ b/roles/nova/vars/main.yml
@@ -72,6 +72,9 @@
cors:
allowed_origin: "*"
allow_headers: "X-Auth-Token,X-OpenStack-Nova-API-Version"
+ database:
+ connection_recycle_time: 10
+ max_pool_size: 1
filter_scheduler:
enabled_filters:
AvailabilityZoneFilter,
diff --git a/roles/nova/vars_test.go b/roles/nova/vars_test.go
new file mode 100644
index 0000000..716b946
--- /dev/null
+++ b/roles/nova/vars_test.go
@@ -0,0 +1,39 @@
+package nova
+
+import (
+ _ "embed"
+ "os"
+ "testing"
+
+ "github.com/goccy/go-yaml"
+ "github.com/stretchr/testify/require"
+
+ "github.com/vexxhost/atmosphere/internal/openstack_helm"
+ "github.com/vexxhost/atmosphere/internal/testutils"
+)
+
+var (
+ //go:embed vars/main.yml
+ varsFile []byte
+ vars Vars
+)
+
+type Vars struct {
+ openstack_helm.HelmValues `yaml:"_nova_helm_values"`
+}
+
+func TestMain(m *testing.M) {
+ t := &testing.T{}
+ err := yaml.UnmarshalWithOptions(varsFile, &vars)
+ require.NoError(t, err)
+
+ code := m.Run()
+ os.Exit(code)
+}
+
+func TestHelmValues(t *testing.T) {
+ vals, err := openstack_helm.CoalescedHelmValues("../../charts/nova", &vars.HelmValues)
+ require.NoError(t, err)
+
+ testutils.TestDatabaseConf(t, vals.Conf.Nova.Database)
+}