mirror of
https://github.com/kairos-io/kairos-agent.git
synced 2025-06-03 01:44:53 +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:
parent
6fe65c4c97
commit
7d9accccd7
@ -213,9 +213,10 @@ func RunInstall(c *config.Config) error {
|
||||
utils.SetEnv(c.Env)
|
||||
utils.SetEnv(c.Install.Env)
|
||||
|
||||
if c.Install.Device == "" || c.Install.Device == "auto" {
|
||||
c.Install.Device = detectDevice()
|
||||
}
|
||||
// if c.Install.Device == "" || c.Install.Device == "auto" {
|
||||
// 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
|
||||
// From the installed system
|
||||
@ -267,7 +268,9 @@ func runInstall(c *config.Config) error {
|
||||
}
|
||||
|
||||
// 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
|
||||
f, err := dumpCCStringToFile(c)
|
||||
|
@ -146,6 +146,7 @@ func (i InstallAction) Run() (err error) {
|
||||
|
||||
// Check no-format flag
|
||||
if i.spec.NoFormat {
|
||||
fmt.Println("!!!!!!!!!!!! won't format")
|
||||
// Check force flag against current device
|
||||
labels := []string{i.spec.Active.Label, i.spec.Recovery.Label}
|
||||
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))
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -97,6 +97,7 @@ func NewInstallSpec(cfg *Config) (*v1.InstallSpec, error) {
|
||||
FS: constants.LinuxImgFs,
|
||||
Size: constants.ImgSize,
|
||||
}
|
||||
fmt.Printf("!!!!!!!!!!!!!!! cfg.Install.Device = %+v\n", cfg.Install.Device)
|
||||
|
||||
spec := &v1.InstallSpec{
|
||||
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
|
||||
// as its the soonest we have access to both
|
||||
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
|
||||
}
|
||||
return installSpec, nil
|
||||
|
Loading…
Reference in New Issue
Block a user