Skip to content

Commit

Permalink
fix commands
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandr Stefurishin <[email protected]>
  • Loading branch information
Alexandr Stefurishin committed Oct 3, 2024
1 parent badc713 commit 75e234c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ func reconcileLLVCreateFunc(
if err = cl.Get(ctx, types.NamespacedName{Namespace: llv.Namespace, Name: llv.Spec.Source}, sourceLlv); err != nil {
log.Error(err, fmt.Sprintf("[reconcileLLVCreateFunc] unable to find source LogicalVolume %s (%s)", llv.Spec.Source, llv.Namespace))
} else {
cmd, err = utils.CreateThinLogicalVolumeSnapshot(sourceLlv)
cmd, err = utils.CreateThinLogicalVolumeSnapshot(sourceLlv.Spec.ActualLVNameOnTheNode, lvg.Spec.ActualVGNameOnTheNode, sourceLlv)
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions images/agent/src/pkg/utils/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@ func CreateThinPoolFullVGSpace(thinPoolName, vgName string) (string, error) {
return cmd.String(), nil
}

func CreateThinLogicalVolumeSnapshot(sourceLlv *v1alpha1.LVMLogicalVolume) (string, error) {
args := []string{"lvcreate", "-s", "-n", sourceLlv.Name, "-y"}
func CreateThinLogicalVolumeSnapshot(name string, vgName string, sourceLlv *v1alpha1.LVMLogicalVolume) (string, error) {
args := []string{"lvcreate", "-s", "-n", name, fmt.Sprintf("%s/%s", vgName, sourceLlv.Name), "-y"}
extendedArgs := lvmStaticExtendedArgs(args)
cmd := exec.Command(internal.NSENTERCmd, extendedArgs...)

Expand Down

0 comments on commit 75e234c

Please sign in to comment.