You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("failed to query current primary: %s", err)
171
171
}
172
172
173
-
conn, err:=n.NewLocalConnection(context.TODO())
174
-
iferr!=nil {
175
-
returnerr
176
-
}
177
-
178
173
switchprimaryIP {
179
174
case"":
180
175
// Check if we can be a primary
181
176
if!n.ValidPrimary() {
182
177
returnfmt.Errorf("no primary to follow and can't configure self as primary because primary region is '%s' and we are in '%s'", n.Region, os.Getenv("PRIMARY_REGION"))
183
178
}
184
179
180
+
conn, err:=n.NewLocalConnection(context.TODO())
181
+
iferr!=nil {
182
+
returnerr
183
+
}
184
+
185
185
// Initialize ourselves as the primary.
186
186
iferr:=n.createRequiredUsers(conn); err!=nil {
187
187
returnfmt.Errorf("failed to create required users: %s", err)
0 commit comments