Skip to content

Commit

Permalink
lxd/patches: Satisfy the linter
Browse files Browse the repository at this point in the history
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
  • Loading branch information
roosterfish committed Feb 5, 2024
1 parent 733382b commit aace96f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lxd/patches.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ func patchClusteringServerCertTrust(name string, d *Daemon) error {

for _, c := range dbCerts {
if c.Type == certificate.TypeServer {
trustedServerCerts[c.Name] = &c
cCopy := c
trustedServerCerts[c.Name] = &cCopy
}
}

Expand Down Expand Up @@ -806,11 +807,11 @@ func patchStorageRenameCustomISOBlockVolumes(name string, d *Daemon) error {
leaderAddress, err := d.gateway.LeaderAddress()
if err != nil {
// If we're not clustered, we're the leader.
if errors.Is(err, cluster.ErrNodeIsNotClustered) {
isLeader = true
} else {
if !errors.Is(err, cluster.ErrNodeIsNotClustered) {
return err
}

isLeader = true
} else if localConfig.ClusterAddress() == leaderAddress {
isLeader = true
}
Expand Down

0 comments on commit aace96f

Please sign in to comment.