Skip to content

Commit

Permalink
Added debugging of /usr/local/google/home/aprindle dir for integratio…
Browse files Browse the repository at this point in the history
…n test errors
  • Loading branch information
aaron-prindle committed May 19, 2017
1 parent b34316f commit 5e37b36
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 8 deletions.
10 changes: 6 additions & 4 deletions cmd/minikube/cmd/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ const (
hypervVirtualSwitch = "hyperv-virtual-switch"
kvmNetwork = "kvm-network"
keepContext = "keep-context"
noMount = "no-mount"
createMount = "mount"
featureGates = "feature-gates"
apiServerName = "apiserver-name"
dnsDomain = "dns-domain"
Expand Down Expand Up @@ -201,9 +201,11 @@ func runStart(cmd *cobra.Command, args []string) {
cmdUtil.MaybeReportErrorAndExit(err)
}

fmt.Printf("Setting up hostmount on %s...\n", viper.GetString(mountString))
// start 9p server mount
if !viper.GetBool(noMount) || cfg.GetMachineName() != constants.DefaultMachineName {
// if !viper.GetBool(noMount) || cfg.GetMachineName() != constants.DefaultMachineName {
if viper.GetBool(createMount) {
fmt.Printf("Setting up hostmount on %s...\n", viper.GetString(mountString))

path := os.Args[0]
mountDebugVal := 0
if glog.V(8) {
Expand Down Expand Up @@ -275,7 +277,7 @@ func calculateDiskSizeInMB(humanReadableDiskSize string) int {

func init() {
startCmd.Flags().Bool(keepContext, constants.DefaultKeepContext, "This will keep the existing kubectl context and will create a minikube context.")
startCmd.Flags().Bool(noMount, constants.DefaultNoMount, "This will not start the mount daemon and automatically mount files into minikube")
startCmd.Flags().Bool(createMount, false, "This will start the mount daemon and automatically mount files into minikube")
startCmd.Flags().String(mountString, constants.DefaultMountDir+":"+constants.DefaultMountEndpoint, "The argument to pass the minikube mount command on start")
startCmd.Flags().String(isoURL, constants.DefaultIsoUrl, "Location of the minikube iso")
startCmd.Flags().String(vmDriver, constants.DefaultVMDriver, fmt.Sprintf("VM driver is one of: %v", constants.SupportedVMDrivers))
Expand Down
2 changes: 1 addition & 1 deletion cmd/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func GetPort() (string, error) {
func KillMountProcess() error {
out, err := ioutil.ReadFile(filepath.Join(constants.GetMinipath(), constants.MountProcessFileName))
if err != nil {
return errors.Wrap(err, "error reading mount process from file")
return nil // no mount process to kill
}
pid, err := strconv.Atoi(string(out))
if err != nil {
Expand Down
23 changes: 23 additions & 0 deletions hack/jenkins/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,48 @@ gsutil cp gs://minikube-builds/${MINIKUBE_LOCATION}/testdata/busybox-mount-test.
chmod +x out/e2e-${OS_ARCH}
chmod +x out/minikube-${OS_ARCH}

#DEBUG
echo "===================="
ls $HOME
echo "===================="


MINIKUBE_WANTREPORTERRORPROMPT=False sudo ./out/minikube-${OS_ARCH} delete \
|| MINIKUBE_WANTREPORTERRORPROMPT=False ./out/minikube-${OS_ARCH} delete \
|| true
sudo rm -rf $HOME/.minikube || true
sudo rm -rf $HOME/.kube || true


# See the default image
./out/minikube-${OS_ARCH} start -h | grep iso

#DEBUG
echo "===================="
ls $HOME
echo "===================="

# Allow this to fail, we'll switch on the return code below.
set +e
${SUDO_PREFIX}out/e2e-${OS_ARCH} -minikube-args="--vm-driver=${VM_DRIVER} --cpus=4 --v=100 ${EXTRA_BUILD_ARGS}" -test.v -test.timeout=30m -binary=out/minikube-${OS_ARCH}
result=$?
set -e

#DEBUG
echo "===================="
ls $HOME
echo "===================="

MINIKUBE_WANTREPORTERRORPROMPT=False sudo ./out/minikube-${OS_ARCH} delete \
|| MINIKUBE_WANTREPORTERRORPROMPT=False ./out/minikube-${OS_ARCH} delete \
|| true
sudo rm -rf $HOME/.minikube || true
sudo rm -rf $HOME/.kube || true

#DEBUG
echo "===================="
ls $HOME
echo "===================="

if [[ $result -eq 0 ]]; then
status="success"
Expand Down
2 changes: 1 addition & 1 deletion hack/jenkins/windows_integration_test_hyperv.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gsutil.cmd cp -r gs://minikube-builds/$env:MINIKUBE_LOCATION/testdata .
./out/minikube-windows-amd64.exe delete
Remove-Item -Recurse -Force C:\Users\jenkins\.minikube

out/e2e-windows-amd64.exe --% -minikube-args="--vm-driver=hyperv --hyperv-virtual-switch=Minikube --cpus=4 $env:EXTRA_BUILD_ARGS --no-mount" -test.v -test.timeout=30m -binary=out/minikube-windows-amd64.exe
out/e2e-windows-amd64.exe --% -minikube-args="--vm-driver=hyperv --hyperv-virtual-switch=Minikube --cpus=4 $env:EXTRA_BUILD_ARGS" -test.v -test.timeout=30m -binary=out/minikube-windows-amd64.exe

$env:result=$lastexitcode
# If the last exit code was 0->success, x>0->error
Expand Down
1 change: 0 additions & 1 deletion pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ const (
const (
DefaultUfsPort = "5640"
DefaultUfsDebugLvl = 0
DefaultNoMount = false
)

const IsMinikubeChildProcess = "IS_MINIKUBE_CHILD_PROCESS"
2 changes: 1 addition & 1 deletion test/integration/persistence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func TestPersistence(t *testing.T) {
t.Fatalf("timed out while checking stopped status: %s", err)
}

minikubeRunner.RunCommand("start", true)
minikubeRunner.Start()
minikubeRunner.CheckStatus(state.Running.String())

if err := commonutil.RetryAfter(5, checkPod, 3*time.Second); err != nil {
Expand Down

0 comments on commit 5e37b36

Please sign in to comment.