File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
cloud/services/compute/instance Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ import (
1111 "sigs.k8s.io/controller-runtime/pkg/log"
1212)
1313
14+ const (
15+ rawImageDirPath = etcCAPPX + "/images"
16+ )
17+
1418// reconcileBootDevice
1519func (s * Service ) reconcileBootDevice (ctx context.Context , vm * proxmox.VirtualMachine ) error {
1620 log := log .FromContext (ctx )
@@ -38,7 +42,6 @@ func (s *Service) setCloudImage(ctx context.Context) error {
3842 image := s .scope .GetImage ()
3943 url := image .URL
4044 fileName := path .Base (url )
41- rawImageDirPath := fmt .Sprintf ("%s/images" , etcCAPPX )
4245 rawImageFilePath := fmt .Sprintf ("%s/%s" , rawImageDirPath , fileName )
4346
4447 // workaround
@@ -56,7 +59,7 @@ func (s *Service) setCloudImage(ctx context.Context) error {
5659 if err != nil {
5760 return err
5861 }
59- cmd := fmt .Sprintf ("echo '%s %s' | %s --check -" , image .Checksum , rawImageFilePath , cscmd )
62+ cmd := fmt .Sprintf ("echo -n '%s %s' | %s --check -" , image .Checksum , rawImageFilePath , cscmd )
6063 out , _ , err = vnc .Exec (context .TODO (), cmd )
6164 if err != nil {
6265 return errors .Errorf ("failed to confirm checksum: %s : %v" , out , err )
You can’t perform that action at this time.
0 commit comments