mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-09-20 09:49:11 +00:00
[WIP] Try to see which code breaks it
Fixes https://github.com/kairos-io/kairos/issues/2281 Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
@@ -213,9 +213,10 @@ func RunInstall(c *config.Config) error {
|
|||||||
utils.SetEnv(c.Env)
|
utils.SetEnv(c.Env)
|
||||||
utils.SetEnv(c.Install.Env)
|
utils.SetEnv(c.Install.Env)
|
||||||
|
|
||||||
if c.Install.Device == "" || c.Install.Device == "auto" {
|
// if c.Install.Device == "" || c.Install.Device == "auto" {
|
||||||
c.Install.Device = detectDevice()
|
// c.Install.Device = detectDevice()
|
||||||
}
|
// }
|
||||||
|
c.Install.Device = "/dev/vdb"
|
||||||
|
|
||||||
// UKI path. Check if we are on UKI AND if we are running off a cd, otherwise it makes no sense to run the install
|
// UKI path. Check if we are on UKI AND if we are running off a cd, otherwise it makes no sense to run the install
|
||||||
// From the installed system
|
// From the installed system
|
||||||
@@ -267,7 +268,9 @@ func runInstall(c *config.Config) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: This should not be neccessary
|
// TODO: This should not be neccessary
|
||||||
installSpec.NoFormat = c.Install.NoFormat
|
fmt.Printf("!!!!!!!!!! installSpec.NoFormat = %+v\n", installSpec.NoFormat)
|
||||||
|
fmt.Printf("!!!!!!!!!! c.Install.NoFormat = %+v\n", c.Install.NoFormat)
|
||||||
|
//installSpec.NoFormat = c.Install.NoFormat
|
||||||
|
|
||||||
// Set our cloud-init to the file we just created
|
// Set our cloud-init to the file we just created
|
||||||
f, err := dumpCCStringToFile(c)
|
f, err := dumpCCStringToFile(c)
|
||||||
|
@@ -146,6 +146,7 @@ func (i InstallAction) Run() (err error) {
|
|||||||
|
|
||||||
// Check no-format flag
|
// Check no-format flag
|
||||||
if i.spec.NoFormat {
|
if i.spec.NoFormat {
|
||||||
|
fmt.Println("!!!!!!!!!!!! won't format")
|
||||||
// Check force flag against current device
|
// Check force flag against current device
|
||||||
labels := []string{i.spec.Active.Label, i.spec.Recovery.Label}
|
labels := []string{i.spec.Active.Label, i.spec.Recovery.Label}
|
||||||
if e.CheckActiveDeployment(labels) && !i.spec.Force {
|
if e.CheckActiveDeployment(labels) && !i.spec.Force {
|
||||||
@@ -164,6 +165,8 @@ func (i InstallAction) Run() (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Printf("!!!!!!!!!!!! i.spec.Target = %+v\n", i.spec.Target)
|
||||||
|
|
||||||
err = e.MountPartitions(i.spec.Partitions.PartitionsByMountPoint(false))
|
err = e.MountPartitions(i.spec.Partitions.PartitionsByMountPoint(false))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@@ -97,6 +97,7 @@ func NewInstallSpec(cfg *Config) (*v1.InstallSpec, error) {
|
|||||||
FS: constants.LinuxImgFs,
|
FS: constants.LinuxImgFs,
|
||||||
Size: constants.ImgSize,
|
Size: constants.ImgSize,
|
||||||
}
|
}
|
||||||
|
fmt.Printf("!!!!!!!!!!!!!!! cfg.Install.Device = %+v\n", cfg.Install.Device)
|
||||||
|
|
||||||
spec := &v1.InstallSpec{
|
spec := &v1.InstallSpec{
|
||||||
Target: cfg.Install.Device,
|
Target: cfg.Install.Device,
|
||||||
@@ -564,6 +565,8 @@ func ReadInstallSpecFromConfig(c *Config) (*v1.InstallSpec, error) {
|
|||||||
// So instead we do the check here and override the installSpec.Target with the Config.Install.Device
|
// So instead we do the check here and override the installSpec.Target with the Config.Install.Device
|
||||||
// as its the soonest we have access to both
|
// as its the soonest we have access to both
|
||||||
if installSpec.Target == "auto" {
|
if installSpec.Target == "auto" {
|
||||||
|
fmt.Printf("!!!!!!! installSpec.Target = %+v\n", installSpec.Target)
|
||||||
|
fmt.Printf("!!!!!!! c.Install.Device = %+v\n", c.Install.Device)
|
||||||
installSpec.Target = c.Install.Device
|
installSpec.Target = c.Install.Device
|
||||||
}
|
}
|
||||||
return installSpec, nil
|
return installSpec, nil
|
||||||
|
Reference in New Issue
Block a user