Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
39eea30
incusd/instance/lxc: Refactor inheritInitPidFd
gwenya May 10, 2025
0030412
Merge pull request #2106 from gwenya/inherit-init-pid-fd
stgraber May 13, 2025
c467c1d
Removed useless else in Makefile
nanjj May 14, 2025
b763c6c
Merge pull request #2115 from nanjj/uselesselse
stgraber May 14, 2025
939cdb9
incusd/storage/ceph: Fix parent tracking for VMs
stgraber May 15, 2025
59f2c35
incusd/main_forknet: Don't touch resolv.conf when no leases
stgraber May 14, 2025
dbe80bf
Merge pull request #2118 from stgraber/main
stgraber May 15, 2025
d8dff9f
Merge pull request #2119 from stgraber/storage
stgraber May 15, 2025
8520c07
incusd/storage/ceph: Fix typo in parseParent
stgraber May 15, 2025
4fff11c
tests: Switch clustering test subnet
stgraber May 17, 2025
55ac8b4
Merge pull request #2120 from stgraber/main
hallyn May 17, 2025
d2741f4
incusd: Simplify code by using modern constructs
nanjj May 13, 2025
a66323e
internal/util: Simplify code by using modern constructs
nanjj May 17, 2025
5235c6f
internal/linux: Simplify code by using modern constructs
nanjj May 17, 2025
4fdc33e
internal/filter: Simplify code by using modern constructs
nanjj May 17, 2025
9f4bf8b
generate-config: Simplify code by using modern constructs
nanjj May 17, 2025
01d22db
generate-database: Simplify code by using modern constructs
nanjj May 17, 2025
7145486
incus-agent: Simplify code by using modern constructs
nanjj May 17, 2025
57c3143
incus-benchmark: Simplify code by using modern constructs
nanjj May 17, 2025
0852291
incusd: Simplify code by using modern constructs
nanjj May 17, 2025
f54d1a6
lxc-to-incus: Simplify code by using modern constructs
nanjj May 17, 2025
f55ecc6
incus: Simplify code by using modern constructs
nanjj May 13, 2025
ac3082a
shared/api: Simplify code by using modern constructs
nanjj May 17, 2025
63dd751
shared/cliconfig: Simplify code by using modern constructs
nanjj May 17, 2025
cd6f85d
shared/idmap: Simplify code by using modern constructs
nanjj May 17, 2025
9b78984
shared/ioprogress: Simplify code by using modern constructs
nanjj May 17, 2025
8df4b1d
shared/osarch: Simplify code by using modern constructs
nanjj May 17, 2025
23bfc8a
shared/subprocess: Simplify code by using modern constructs
nanjj May 17, 2025
c56b9fb
test: Simplify code by using modern constructs
nanjj May 17, 2025
b39fdc5
Merge pull request #2111 from nanjj/gomodernize02
stgraber May 17, 2025
4b05f56
Merge pull request #2113 from nanjj/gomodernize
stgraber May 17, 2025
170a158
Merge pull request #2112 from nanjj/gomodernize03
stgraber May 17, 2025
e9e42e7
Merge pull request #2110 from nanjj/gomodern_cmd_incusd
stgraber May 17, 2025
aef7410
Translated using Weblate (Spanish)
jorgeteixe May 17, 2025
907f527
Merge pull request #2123 from weblate/weblate-incus-cli
stgraber May 19, 2025
54245ab
incusd/instances: Tweak storage migration errors
stgraber May 20, 2025
d9bdf39
incusd/instances_post: Prevent pointless device overrides
stgraber May 21, 2025
769d23b
incusd/instance: Fix incorrect cluster.Connect call
stgraber May 21, 2025
e74129e
incusd/instance/qemu: Enable invtsc CPU extension when not migratable
nanjj May 20, 2025
2653cea
Merge pull request #2131 from stgraber/main
hallyn May 21, 2025
59606f4
Merge pull request #2127 from nanjj/invtsc
stgraber May 21, 2025
4fbcea5
Merge pull request #2134 from stgraber/cluster
hallyn May 21, 2025
b7a69e7
Merge pull request #2133 from stgraber/migrate
hallyn May 21, 2025
341d425
Makefile: Pin tablewriter (API breakage)
stgraber May 21, 2025
727041a
client: Use the umoci Go package instead of the command
presztak Apr 2, 2025
8a84626
doc: Remove mentions of the umoci command
presztak Apr 2, 2025
df2dbf6
gomod: Update dependencies
presztak Apr 2, 2025
7b20a69
tests: Update godeps
stgraber May 21, 2025
175c480
tests: Skip rootless-containers/proto/go-proto (Apache 2.0)
stgraber May 21, 2025
c87c56a
Merge pull request #1880 from presztak/use_umoci_package
stgraber May 21, 2025
b232a70
internal/server/device: remove no-op rewriteHostAddr
cyphar May 22, 2025
edd79a6
incusd/forkproxy: join the correct mntns for listen
cyphar May 22, 2025
8de0cde
tests: add tests for bind=container with proxy device
cyphar May 22, 2025
d7d4a26
Merge pull request #2136 from cyphar/proxy-unix-ctr
stgraber May 22, 2025
48a2cd3
client: Don't needlessly use format string functions
NathanChase22 May 23, 2025
79075b3
tests: Don't needlessly use format string functions
NathanChase22 May 23, 2025
4e895ed
lxd-to-incus: Don't needlessly use format string functions
NathanChase22 May 23, 2025
6fa4fe1
lxc-to-incus: Don't needlessly use format string functions
NathanChase22 May 23, 2025
4ba4f28
incus-simplestreams: Don't needlessly use format string functions
NathanChase22 May 23, 2025
e01ea42
generate-config: Don't needlessly use format string functions
NathanChase22 May 23, 2025
ef6520a
generate-database: Don't needlessly use format string functions
NathanChase22 May 23, 2025
e0ab377
incus-agent: Don't needlessly use format string functions
NathanChase22 May 23, 2025
de4ff8f
fuidshift: Don't needlessly use format string functions
NathanChase22 May 23, 2025
a738dd4
incus-user: Don't needlessly use format string functions
NathanChase22 May 23, 2025
92748c7
incus-migrate: Don't needlessly use format string functions
NathanChase22 May 23, 2025
5e056f1
incus: Don't needlessly use format string functions
NathanChase22 May 23, 2025
1990f8f
shared/validate: Don't needlessly use format string functions
NathanChase22 May 23, 2025
3a491eb
shared/util: Don't needlessly use format string functions
NathanChase22 May 23, 2025
303289f
shared/tls: Don't needlessly use format string functions
NathanChase22 May 23, 2025
d2b8862
shared/tcp: Don't needlessly use format string functions
NathanChase22 May 23, 2025
aba6837
shared/subprocess: Don't needlessly use format string functions
NathanChase22 May 23, 2025
e2737f2
shared/simplestreams: Don't needlessly use format string functions
NathanChase22 May 23, 2025
518a09a
shared/logger: Don't needlessly use format string functions
NathanChase22 May 23, 2025
991805d
shared/ioprogress: Don't needlessly use format string functions
NathanChase22 May 23, 2025
0bef06d
shared/idmap: Don't needlessly use format string functions
NathanChase22 May 23, 2025
ed5778e
shared/cliconfig: Don't needlessly use format string functions
NathanChase22 May 23, 2025
9ddfa49
shared/cancel: Don't needlessly use format string functions
NathanChase22 May 23, 2025
f1880c8
shared/ask: Don't needlessly use format string functions
NathanChase22 May 23, 2025
72b3baf
shared/archive: Don't needlessly use format string functions
NathanChase22 May 23, 2025
fd503dd
shared/api: Don't needlessly use format string functions
NathanChase22 May 23, 2025
70f140f
internal/util: Don't needlessly use format string functions
NathanChase22 May 23, 2025
5f81bb2
internal/usbid: Don't needlessly use format string functions
NathanChase22 May 23, 2025
403ca20
internal/rsync: Don't needlessly use format string functions
NathanChase22 May 23, 2025
ba322a5
internal/netutils: Don't needlessly use format string functions
NathanChase22 May 23, 2025
09d6491
internal/migration: Don't needlessly use format string functions
NathanChase22 May 23, 2025
0464beb
internal/linux: Don't needlessly use format string functions
NathanChase22 May 23, 2025
70a56ab
internal/instance: Don't needlessly use format string functions
NathanChase22 May 23, 2025
7081c3a
internal/filter: Don't needlessly use format string functions
NathanChase22 May 23, 2025
35fe3e4
internal/cmd: Don't needlessly use format string functions
NathanChase22 May 23, 2025
bf0b67d
incusd: Don't needlessly use format string functions
NathanChase22 May 23, 2025
1acac6b
incus-migrate: Prompt for cluster target
MaheshPunjabi May 19, 2025
5c2c4b0
Merge pull request #2107 from NathanChase22/fix-nonconstant
stgraber May 23, 2025
127f5e6
Merge pull request #2124 from MaheshPunjabi/i2049-allow-specifying-cl…
stgraber May 23, 2025
4991cfe
incus/instance/qmp: Implement our own QMP client
nanjj May 23, 2025
1d53e5a
incusd/instance/qmp: Add tests for in-house QMP
nanjj May 23, 2025
1282859
incusd/instance/qmp: Switch to our own QMP client
nanjj May 23, 2025
1a855bd
gomod: Update dependencies
nanjj May 23, 2025
168b401
incusd/instance/qmp: Don't export internal QMP implementation
stgraber May 23, 2025
f083089
Merge pull request #2105 from nanjj/qmp
stgraber May 24, 2025
3036acc
Make sure limits.memory <= root.size.state
nanjj May 23, 2025
0eb5268
incusd/instance/qmp: if else if to switch case
nanjj May 24, 2025
5ae916b
incusd/instance/qmp: Remove weird qemu qmp bug handling
nanjj May 24, 2025
61038a5
incusd/instance/qmp: Refactor qmpWriteMsg
nanjj May 24, 2025
6f6c1bc
Merge pull request #2139 from nanjj/qmp01
stgraber May 24, 2025
d165840
Merge pull request #2138 from nanjj/lessorequal
stgraber May 24, 2025
f0f4dc0
Merge pull request #2140 from nanjj/qmp02
stgraber May 24, 2025
cd8f29d
api: network_ovn_external_nic_address
stgraber May 26, 2025
6732f22
incusd/device/nic_ovn: Added the two new nic options
OGCbn May 7, 2025
e191036
incusd/network/ovn: Add support for applying external address
OGCbn May 26, 2025
8f6d9f1
doc: Update config
stgraber May 17, 2025
b976224
Merge pull request #2090 from davidbockelman/override-ext-address
stgraber May 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ ifneq "$(INCUS_OFFLINE)" ""
endif
$(GO) get -t -v -u ./...
$(GO) get github.com/go-jose/go-jose/v4@v4.0.5
$(GO) get github.com/olekukonko/tablewriter@v0.0.5
$(GO) mod tidy --go=1.23.7
$(GO) get toolchain@none

Expand Down Expand Up @@ -306,7 +307,6 @@ endif
ifeq ($(shell command -v shellcheck),)
echo "Please install shellcheck"
exit 1
else
endif
ifeq ($(shell command -v flake8),)
echo "Please install flake8"
Expand Down
8 changes: 4 additions & 4 deletions client/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package incus

import (
"context"
"fmt"
"errors"
"sync"

"github.com/lxc/incus/v6/shared/api"
Expand Down Expand Up @@ -30,7 +30,7 @@ type EventTarget struct {
// AddHandler adds a function to be called whenever an event is received.
func (e *EventListener) AddHandler(types []string, function func(api.Event)) (*EventTarget, error) {
if function == nil {
return nil, fmt.Errorf("A valid function must be provided")
return nil, errors.New("A valid function must be provided")
}

// Handle locking
Expand All @@ -52,7 +52,7 @@ func (e *EventListener) AddHandler(types []string, function func(api.Event)) (*E
// RemoveHandler removes a function to be called whenever an event is received.
func (e *EventListener) RemoveHandler(target *EventTarget) error {
if target == nil {
return fmt.Errorf("A valid event target must be provided")
return errors.New("A valid event target must be provided")
}

// Handle locking
Expand All @@ -69,7 +69,7 @@ func (e *EventListener) RemoveHandler(target *EventTarget) error {
}
}

return fmt.Errorf("Couldn't find this function and event types combination")
return errors.New("Couldn't find this function and event types combination")
}

// Disconnect must be used once done listening for events.
Expand Down
3 changes: 2 additions & 1 deletion client/incus.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
Expand Down Expand Up @@ -137,7 +138,7 @@ func (r *ProtocolIncus) isSameServer(server Server) bool {
// GetHTTPClient returns the http client used for the connection. This can be used to set custom http options.
func (r *ProtocolIncus) GetHTTPClient() (*http.Client, error) {
if r.http == nil {
return nil, fmt.Errorf("HTTP client isn't set, bad connection")
return nil, errors.New("HTTP client isn't set, bad connection")
}

return r.http, nil
Expand Down
7 changes: 4 additions & 3 deletions client/incus_certificates.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package incus

import (
"errors"
"fmt"
"net/url"

Expand Down Expand Up @@ -80,7 +81,7 @@ func (r *ProtocolIncus) CreateCertificate(certificate api.CertificatesPost) erro
// UpdateCertificate updates the certificate definition.
func (r *ProtocolIncus) UpdateCertificate(fingerprint string, certificate api.CertificatePut, ETag string) error {
if !r.HasExtension("certificate_update") {
return fmt.Errorf("The server is missing the required \"certificate_update\" API extension")
return errors.New("The server is missing the required \"certificate_update\" API extension")
}

// Send the request
Expand All @@ -106,11 +107,11 @@ func (r *ProtocolIncus) DeleteCertificate(fingerprint string) error {
// CreateCertificateToken requests a certificate add token.
func (r *ProtocolIncus) CreateCertificateToken(certificate api.CertificatesPost) (Operation, error) {
if !r.HasExtension("certificate_token") {
return nil, fmt.Errorf("The server is missing the required \"certificate_token\" API extension")
return nil, errors.New("The server is missing the required \"certificate_token\" API extension")
}

if !certificate.Token {
return nil, fmt.Errorf("Token needs to be true if requesting a token")
return nil, errors.New("Token needs to be true if requesting a token")
}

// Send the request
Expand Down
41 changes: 21 additions & 20 deletions client/incus_cluster.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package incus

import (
"errors"
"fmt"

"github.com/lxc/incus/v6/shared/api"
Expand All @@ -9,7 +10,7 @@ import (
// GetCluster returns information about a cluster.
func (r *ProtocolIncus) GetCluster() (*api.Cluster, string, error) {
if !r.HasExtension("clustering") {
return nil, "", fmt.Errorf("The server is missing the required \"clustering\" API extension")
return nil, "", errors.New("The server is missing the required \"clustering\" API extension")
}

cluster := &api.Cluster{}
Expand All @@ -24,12 +25,12 @@ func (r *ProtocolIncus) GetCluster() (*api.Cluster, string, error) {
// UpdateCluster requests to bootstrap a new cluster or join an existing one.
func (r *ProtocolIncus) UpdateCluster(cluster api.ClusterPut, ETag string) (Operation, error) {
if !r.HasExtension("clustering") {
return nil, fmt.Errorf("The server is missing the required \"clustering\" API extension")
return nil, errors.New("The server is missing the required \"clustering\" API extension")
}

if cluster.ServerAddress != "" || cluster.ClusterToken != "" || len(cluster.MemberConfig) > 0 {
if !r.HasExtension("clustering_join") {
return nil, fmt.Errorf("The server is missing the required \"clustering_join\" API extension")
return nil, errors.New("The server is missing the required \"clustering_join\" API extension")
}
}

Expand All @@ -45,7 +46,7 @@ func (r *ProtocolIncus) UpdateCluster(cluster api.ClusterPut, ETag string) (Oper
// depending on the force flag).
func (r *ProtocolIncus) DeleteClusterMember(name string, force bool) error {
if !r.HasExtension("clustering") {
return fmt.Errorf("The server is missing the required \"clustering\" API extension")
return errors.New("The server is missing the required \"clustering\" API extension")
}

params := ""
Expand All @@ -64,7 +65,7 @@ func (r *ProtocolIncus) DeleteClusterMember(name string, force bool) error {
// GetClusterMemberNames returns the URLs of the current members in the cluster.
func (r *ProtocolIncus) GetClusterMemberNames() ([]string, error) {
if !r.HasExtension("clustering") {
return nil, fmt.Errorf("The server is missing the required \"clustering\" API extension")
return nil, errors.New("The server is missing the required \"clustering\" API extension")
}

// Fetch the raw URL values.
Expand All @@ -82,7 +83,7 @@ func (r *ProtocolIncus) GetClusterMemberNames() ([]string, error) {
// GetClusterMembers returns the current members of the cluster.
func (r *ProtocolIncus) GetClusterMembers() ([]api.ClusterMember, error) {
if !r.HasExtension("clustering") {
return nil, fmt.Errorf("The server is missing the required \"clustering\" API extension")
return nil, errors.New("The server is missing the required \"clustering\" API extension")
}

members := []api.ClusterMember{}
Expand All @@ -97,7 +98,7 @@ func (r *ProtocolIncus) GetClusterMembers() ([]api.ClusterMember, error) {
// GetClusterMember returns information about the given member.
func (r *ProtocolIncus) GetClusterMember(name string) (*api.ClusterMember, string, error) {
if !r.HasExtension("clustering") {
return nil, "", fmt.Errorf("The server is missing the required \"clustering\" API extension")
return nil, "", errors.New("The server is missing the required \"clustering\" API extension")
}

member := api.ClusterMember{}
Expand All @@ -112,12 +113,12 @@ func (r *ProtocolIncus) GetClusterMember(name string) (*api.ClusterMember, strin
// UpdateClusterMember updates information about the given member.
func (r *ProtocolIncus) UpdateClusterMember(name string, member api.ClusterMemberPut, ETag string) error {
if !r.HasExtension("clustering_edit_roles") {
return fmt.Errorf("The server is missing the required \"clustering_edit_roles\" API extension")
return errors.New("The server is missing the required \"clustering_edit_roles\" API extension")
}

if member.FailureDomain != "" {
if !r.HasExtension("clustering_failure_domains") {
return fmt.Errorf("The server is missing the required \"clustering_failure_domains\" API extension")
return errors.New("The server is missing the required \"clustering_failure_domains\" API extension")
}
}

Expand All @@ -133,7 +134,7 @@ func (r *ProtocolIncus) UpdateClusterMember(name string, member api.ClusterMembe
// RenameClusterMember changes the name of an existing member.
func (r *ProtocolIncus) RenameClusterMember(name string, member api.ClusterMemberPost) error {
if !r.HasExtension("clustering") {
return fmt.Errorf("The server is missing the required \"clustering\" API extension")
return errors.New("The server is missing the required \"clustering\" API extension")
}

_, _, err := r.query("POST", fmt.Sprintf("/cluster/members/%s", name), member, "")
Expand All @@ -147,7 +148,7 @@ func (r *ProtocolIncus) RenameClusterMember(name string, member api.ClusterMembe
// CreateClusterMember generates a join token to add a cluster member.
func (r *ProtocolIncus) CreateClusterMember(member api.ClusterMembersPost) (Operation, error) {
if !r.HasExtension("clustering_join_token") {
return nil, fmt.Errorf("The server is missing the required \"clustering_join_token\" API extension")
return nil, errors.New("The server is missing the required \"clustering_join_token\" API extension")
}

op, _, err := r.queryOperation("POST", "/cluster/members", member, "")
Expand All @@ -161,7 +162,7 @@ func (r *ProtocolIncus) CreateClusterMember(member api.ClusterMembersPost) (Oper
// UpdateClusterCertificate updates the cluster certificate for every node in the cluster.
func (r *ProtocolIncus) UpdateClusterCertificate(certs api.ClusterCertificatePut, ETag string) error {
if !r.HasExtension("clustering_update_cert") {
return fmt.Errorf("The server is missing the required \"clustering_update_cert\" API extension")
return errors.New("The server is missing the required \"clustering_update_cert\" API extension")
}

_, _, err := r.query("PUT", "/cluster/certificate", certs, ETag)
Expand Down Expand Up @@ -192,7 +193,7 @@ func (r *ProtocolIncus) GetClusterMemberState(name string) (*api.ClusterMemberSt
// UpdateClusterMemberState evacuates or restores a cluster member.
func (r *ProtocolIncus) UpdateClusterMemberState(name string, state api.ClusterMemberStatePost) (Operation, error) {
if !r.HasExtension("clustering_evacuation") {
return nil, fmt.Errorf("The server is missing the required \"clustering_evacuation\" API extension")
return nil, errors.New("The server is missing the required \"clustering_evacuation\" API extension")
}

op, _, err := r.queryOperation("POST", fmt.Sprintf("/cluster/members/%s/state", name), state, "")
Expand All @@ -206,7 +207,7 @@ func (r *ProtocolIncus) UpdateClusterMemberState(name string, state api.ClusterM
// GetClusterGroups returns the cluster groups.
func (r *ProtocolIncus) GetClusterGroups() ([]api.ClusterGroup, error) {
if !r.HasExtension("clustering_groups") {
return nil, fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return nil, errors.New("The server is missing the required \"clustering_groups\" API extension")
}

groups := []api.ClusterGroup{}
Expand All @@ -222,7 +223,7 @@ func (r *ProtocolIncus) GetClusterGroups() ([]api.ClusterGroup, error) {
// GetClusterGroupNames returns the cluster group names.
func (r *ProtocolIncus) GetClusterGroupNames() ([]string, error) {
if !r.HasExtension("clustering_groups") {
return nil, fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return nil, errors.New("The server is missing the required \"clustering_groups\" API extension")
}

urls := []string{}
Expand All @@ -239,7 +240,7 @@ func (r *ProtocolIncus) GetClusterGroupNames() ([]string, error) {
// RenameClusterGroup changes the name of an existing cluster group.
func (r *ProtocolIncus) RenameClusterGroup(name string, group api.ClusterGroupPost) error {
if !r.HasExtension("clustering_groups") {
return fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return errors.New("The server is missing the required \"clustering_groups\" API extension")
}

_, _, err := r.query("POST", fmt.Sprintf("/cluster/groups/%s", name), group, "")
Expand All @@ -253,7 +254,7 @@ func (r *ProtocolIncus) RenameClusterGroup(name string, group api.ClusterGroupPo
// CreateClusterGroup creates a new cluster group.
func (r *ProtocolIncus) CreateClusterGroup(group api.ClusterGroupsPost) error {
if !r.HasExtension("clustering_groups") {
return fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return errors.New("The server is missing the required \"clustering_groups\" API extension")
}

_, _, err := r.query("POST", "/cluster/groups", group, "")
Expand All @@ -267,7 +268,7 @@ func (r *ProtocolIncus) CreateClusterGroup(group api.ClusterGroupsPost) error {
// DeleteClusterGroup deletes an existing cluster group.
func (r *ProtocolIncus) DeleteClusterGroup(name string) error {
if !r.HasExtension("clustering_groups") {
return fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return errors.New("The server is missing the required \"clustering_groups\" API extension")
}

_, _, err := r.query("DELETE", fmt.Sprintf("/cluster/groups/%s", name), nil, "")
Expand All @@ -281,7 +282,7 @@ func (r *ProtocolIncus) DeleteClusterGroup(name string) error {
// UpdateClusterGroup updates information about the given cluster group.
func (r *ProtocolIncus) UpdateClusterGroup(name string, group api.ClusterGroupPut, ETag string) error {
if !r.HasExtension("clustering_groups") {
return fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return errors.New("The server is missing the required \"clustering_groups\" API extension")
}

// Send the request
Expand All @@ -296,7 +297,7 @@ func (r *ProtocolIncus) UpdateClusterGroup(name string, group api.ClusterGroupPu
// GetClusterGroup returns information about the given cluster group.
func (r *ProtocolIncus) GetClusterGroup(name string) (*api.ClusterGroup, string, error) {
if !r.HasExtension("clustering_groups") {
return nil, "", fmt.Errorf("The server is missing the required \"clustering_groups\" API extension")
return nil, "", errors.New("The server is missing the required \"clustering_groups\" API extension")
}

group := api.ClusterGroup{}
Expand Down
6 changes: 3 additions & 3 deletions client/incus_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package incus
import (
"context"
"encoding/json"
"fmt"
"errors"
"slices"
"time"

Expand Down Expand Up @@ -31,7 +31,7 @@ func (r *ProtocolIncus) getEvents(allProjects bool) (*EventListener, error) {

connInfo, _ := r.GetConnectionInfo()
if connInfo.Project == "" {
return nil, fmt.Errorf("Unexpected empty project in connection info")
return nil, errors.New("Unexpected empty project in connection info")
}

if !allProjects {
Expand Down Expand Up @@ -184,7 +184,7 @@ func (r *ProtocolIncus) SendEvent(event api.Event) error {
}

if eventConn == nil {
return fmt.Errorf("No available event listener connection")
return errors.New("No available event listener connection")
}

deadline, ok := r.ctx.Deadline()
Expand Down
Loading
Loading