Skip to content

Commit

Permalink
incusd/instance/lxc: formatting updates
Browse files Browse the repository at this point in the history
Signed-off-by: Abhiram824 <abhisuhaas1@gmail.com>
  • Loading branch information
Abhiram824 committed Apr 23, 2024
1 parent cda3116 commit 3641c36
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/server/instance/drivers/driver_lxc.go
Original file line number Diff line number Diff line change
Expand Up @@ -2394,7 +2394,7 @@ func (d *lxc) detachInterfaceRename(netns string, ifName string, hostName string
// Start starts the instance.
func (d *lxc) Start(stateful bool) error {
// require container_migration_stateful is set to true when stateful is true
if stateful && util.IsFalse(d.expandedConfig["migration.stateful"]){
if stateful && util.IsFalse(d.expandedConfig["migration.stateful"]) {
return fmt.Errorf("Stateful start requires that the instance migration.stateful set to true")
}

Expand Down Expand Up @@ -2654,7 +2654,7 @@ func (d *lxc) Stop(stateful bool) error {
d.logger.Debug("Stop started", logger.Ctx{"stateful": stateful})
defer d.logger.Debug("Stop finished", logger.Ctx{"stateful": stateful})

if stateful && util.IsFalse(d.expandedConfig["migration.stateful"]){
if stateful && util.IsFalse(d.expandedConfig["migration.stateful"]) {
return fmt.Errorf("Stateful stop requires the instance to have migration.stateful set to true")
}

Expand Down Expand Up @@ -3427,7 +3427,7 @@ func (d *lxc) RenderState(hostInterfaces []net.Interface) (*api.InstanceState, e
// snapshot creates a snapshot of the instance.
func (d *lxc) snapshot(name string, expiry time.Time, stateful bool) error {

if stateful && util.IsFalse(d.expandedConfig["migration.stateful"]){
if stateful && util.IsFalse(d.expandedConfig["migration.stateful"]) {
return fmt.Errorf("Stateful snapshots require that the instance has migration.stateful set to true")
}
// Deal with state.
Expand Down

0 comments on commit 3641c36

Please sign in to comment.