Skip to content
This repository has been archived by the owner on Oct 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1732 from rancher/partition-option-doesnt-need-ho…
Browse files Browse the repository at this point in the history
…st-dev-mount

Don't need host dev mount for pre-created partition
  • Loading branch information
SvenDowideit authored Mar 27, 2017
2 parents da5cab6 + 2f28a00 commit 02a47b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
15 changes: 8 additions & 7 deletions cmd/control/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ func installAction(c *cli.Context) error {
log.Fatalf("invalid arguments %v", c.Args())
}

if c.Bool("debug") {
debug := c.Bool("debug")
if debug {
originalLevel := log.GetLevel()
defer log.SetLevel(originalLevel)
log.SetLevel(log.DebugLevel)
Expand Down Expand Up @@ -154,7 +155,7 @@ func installAction(c *cli.Context) error {
cloudConfig = uc
}

if err := runInstall(image, installType, cloudConfig, device, partition, kappend, force, kexec, isoinstallerloaded); err != nil {
if err := runInstall(image, installType, cloudConfig, device, partition, kappend, force, kexec, isoinstallerloaded, debug); err != nil {
log.WithFields(log.Fields{"err": err}).Fatal("Failed to run install")
return err
}
Expand All @@ -167,7 +168,7 @@ func installAction(c *cli.Context) error {
return nil
}

func runInstall(image, installType, cloudConfig, device, partition, kappend string, force, kexec, isoinstallerloaded bool) error {
func runInstall(image, installType, cloudConfig, device, partition, kappend string, force, kexec, isoinstallerloaded, debug bool) error {
fmt.Printf("Installing from %s\n", image)

if !force {
Expand Down Expand Up @@ -278,6 +279,9 @@ func runInstall(image, installType, cloudConfig, device, partition, kappend stri
if kexec {
installerCmd = append(installerCmd, "--kexec")
}
if debug {
installerCmd = append(installerCmd, "--debug")
}

// TODO: mount at /mnt for shared mount?
if useIso {
Expand All @@ -300,10 +304,7 @@ func runInstall(image, installType, cloudConfig, device, partition, kappend stri

log.Debugf("running installation")

if partition != "" {
device = "/host" + device
partition = "/host" + partition
} else {
if partition == "" {
if installType == "generic" ||
installType == "syslinux" ||
installType == "gptsyslinux" {
Expand Down
1 change: 0 additions & 1 deletion scripts/run-install
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ sudo kpartx -a ${DISK}

docker run --privileged -it --rm \
-v /dev/mapper:/dev/mapper \
-v /:/host \
-v ${STATE}:/cluster \
rancher/os:${VERSION} \
--isoinstallerloaded=1 \
Expand Down

0 comments on commit 02a47b2

Please sign in to comment.