From 7805c91f983af5b01634edc5c1476147444e59f4 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Mon, 8 May 2017 12:35:51 +0000 Subject: [PATCH 01/20] buildroot v2017.02.2 Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 6ae0bd0c..da4b4ad6 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -74,8 +74,8 @@ ARG OS_SERVICES_REPO=https://raw.githubusercontent.com/${OS_REPO}/os-services ARG IMAGE_NAME=${OS_REPO}/os ARG DFS_IMAGE=${OS_REPO}/docker:v${DOCKER_VERSION}-2 -ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_amd64.tar.xz -ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2016.08.1-2/os-base_arm64.tar.xz +ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2017.02.2-1-uclibc-1.0.17-3/os-base_amd64.tar.xz +ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2016.08.1-3/os-base_arm64.tar.xz ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2016.08.1-3/os-base_arm.tar.xz ###################################################### From 411810bb2dc3c6dc05f921fd8af534c14c6805b6 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 6 Jun 2017 13:42:30 +1000 Subject: [PATCH 02/20] buildroot v2017.02.3 Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index da4b4ad6..6a7a2350 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -74,9 +74,9 @@ ARG OS_SERVICES_REPO=https://raw.githubusercontent.com/${OS_REPO}/os-services ARG IMAGE_NAME=${OS_REPO}/os ARG DFS_IMAGE=${OS_REPO}/docker:v${DOCKER_VERSION}-2 -ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2017.02.2-1-uclibc-1.0.17-3/os-base_amd64.tar.xz -ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2016.08.1-3/os-base_arm64.tar.xz -ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2016.08.1-3/os-base_arm.tar.xz +ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2017.02.3-1/os-base_amd64.tar.xz +ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2017.02.3-1/os-base_arm64.tar.xz +ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2017.02.3-1/os-base_arm.tar.xz ###################################################### # Set up environment and export all ARGS as ENV From ff3db59776e2c3b903317b3ada765633775da48d Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 21 Jun 2017 22:53:48 +1000 Subject: [PATCH 03/20] Merge pull request #1909 from superseb/remove_dkms_sidebar Remove link to removed page DKMS (cherry picked from commit 922b23eb78044b27f6cb672e66ed1a07f7595a83) --- docs/_includes/os-sidebar.html | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/_includes/os-sidebar.html b/docs/_includes/os-sidebar.html index fa2114f6..bb08e466 100644 --- a/docs/_includes/os-sidebar.html +++ b/docs/_includes/os-sidebar.html @@ -51,7 +51,6 @@
  • Adding kernel parameters
  • Loading kernel modules
  • Install kernel modules that require kernel headers
  • -
  • DKMS
  • From b5ca78c2690ce7cb27623d199dd9d53fea0706c8 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 21 Jun 2017 22:55:12 +1000 Subject: [PATCH 04/20] Merge pull request #1911 from SvenDowideit/registry-mirror-docs Add some specific examples for registry mirror settings (cherry picked from commit c539270c2ac41937c254cc9f24397df3a15c98b6) --- docs/os/configuration/docker/index.md | 41 +++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/docs/os/configuration/docker/index.md b/docs/os/configuration/docker/index.md index 93681fa2..087de7d9 100644 --- a/docs/os/configuration/docker/index.md +++ b/docs/os/configuration/docker/index.md @@ -28,7 +28,7 @@ You can also customize Docker after it's been started using `ros config`. $ sudo ros config set rancher.docker.storage_driver overlay ``` -#### Valid Keys for Docker +#### User Docker settings Many of the standard Docker daemon arguments can be placed under the `rancher.docker` key. The command needed to start the Docker daemon will be generated based on these arguments. The following arguments are currently supported. @@ -77,7 +77,7 @@ rancher: storage_driver: overlay ``` -#### Valid Keys for System Docker +#### System Docker settings All daemon arguments shown in the first table are also available to System Docker. The following are also supported. @@ -85,3 +85,40 @@ Key | Value | Default | Description ---|---|---| --- `extra_args` | List of Strings | `[]` | Arbitrary daemon arguments, appended to the generated command `environment` | List of Strings (optional) | `[]` | + +### Using a pull through registry mirror + +There are 3 Docker engines that can be configured to use the pull-through Docker Hub registry mirror cache: + +``` +#cloud-config +rancher: + bootstrap_docker: + registry_mirror: "http://10.10.10.23:5555" + docker: + registry_mirror: "http://10.10.10.23:5555" + system_docker: + registry_mirror: "http://10.10.10.23:5555" +``` + +`bootstrap_docker` is used to prepare and initial network and pull any cloud-config options that can be used to configure the final network configuration and System-docker - its very unlikely to pull any images. + +A successful pull through mirror cache request by System-docker looks like: + +``` +[root@rancher-dev rancher]# system-docker pull alpine +Using default tag: latest +DEBU[0201] Calling GET /v1.23/info +> WARN[0201] Could not get operating system name: Error opening /usr/lib/os-release: open /usr/lib/os-release: no such file or directory +WARN[0201] Could not get operating system name: Error opening /usr/lib/os-release: open /usr/lib/os-release: no such file or directory +DEBU[0201] Calling POST /v1.23/images/create?fromImage=alpine%3Alatest +DEBU[0201] hostDir: /etc/docker/certs.d/10.10.10.23:5555 +DEBU[0201] Trying to pull alpine from http://10.10.10.23:5555/ v2 +DEBU[0204] Pulling ref from V2 registry: alpine:latest +DEBU[0204] pulling blob "sha256:2aecc7e1714b6fad58d13aedb0639011b37b86f743ba7b6a52d82bd03014b78e" latest: Pulling from library/alpine +DEBU[0204] Downloaded 2aecc7e1714b to tempfile /var/lib/system-docker/tmp/GetImageBlob281102233 2aecc7e1714b: Extracting 1.99 MB/1.99 MB +DEBU[0204] Untar time: 0.161064213s +DEBU[0204] Applied tar sha256:3fb66f713c9fa9debcdaa58bb9858bd04c17350d9614b7a250ec0ee527319e59 to 841c99a5995007d7a66b922be9bafdd38f8090af17295b4a44436ef433a2aecc7e1714b: Pull complete +Digest: sha256:0b94d1d1b5eb130dd0253374552445b39470653fb1a1ec2d81490948876e462c +Status: Downloaded newer image for alpine:latest +``` From 39922220b0fe1f04504f6f68a0aa7df1fd719077 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 20 Jun 2017 15:26:30 +1000 Subject: [PATCH 05/20] Merge pull request #1930 from SvenDowideit/use-engine-registry-mirror Use engine registry mirror (cherry picked from commit 1e3cd14af726c61a3d98a042f242e8e123bc4e51) --- scripts/run-common | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run-common b/scripts/run-common index 62b7475e..d4f45093 100755 --- a/scripts/run-common +++ b/scripts/run-common @@ -48,4 +48,8 @@ REBUILD=1 QEMUARCH=${qemuarch["${ARCH}"]} TTYCONS=${ttycons["${ARCH}"]} -DEFAULT_KERNEL_ARGS="printk.devkmsg=on rancher.debug=true rancher.password=rancher console=${TTYCONS} rancher.autologin=${TTYCONS}" +if [ "$ENGINE_REGISTRY_MIRROR" != "" ]; then + REGISTRY_MIRROR="rancher.bootstrap_docker.registry_mirror=${ENGINE_REGISTRY_MIRROR} rancher.system_docker.registry_mirror=${ENGINE_REGISTRY_MIRROR} rancher.docker.registry_mirror=${ENGINE_REGISTRY_MIRROR}" +fi + +DEFAULT_KERNEL_ARGS="printk.devkmsg=on rancher.debug=true rancher.password=rancher console=${TTYCONS} rancher.autologin=${TTYCONS} ${REGISTRY_MIRROR} " From cc133372a7e6c907bf6bd0def581fea4f85f8e70 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 15 Jun 2017 15:55:30 +1000 Subject: [PATCH 06/20] Merge pull request #1920 from SvenDowideit/add-apt-cache-build-arg Add apt-cacher build arg (cherry picked from commit 26939ebb7eddf3b8fa502d4a43697479befccaa1) --- Dockerfile.dapper | 11 ++++++++--- scripts/installer/kexec/Dockerfile.dapper | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 6a7a2350..fd4ce621 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -1,8 +1,13 @@ FROM ubuntu:16.04 # FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04 -RUN apt-get update && \ - apt-get install -y --no-install-recommends \ +# get the apt-cacher proxy set +ARG APTPROXY= + +RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01proxy \ + && cat /etc/apt/apt.conf.d/01proxy \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ build-essential \ ca-certificates \ cpio \ @@ -32,7 +37,7 @@ RUN apt-get update && \ ########## Dapper Configuration ##################### -ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG +ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG APTPROXY ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_SOURCE /go/src/github.com/rancher/os ENV DAPPER_OUTPUT ./bin ./dist ./build/initrd ./build/kernel diff --git a/scripts/installer/kexec/Dockerfile.dapper b/scripts/installer/kexec/Dockerfile.dapper index a60d39f7..49ad5889 100644 --- a/scripts/installer/kexec/Dockerfile.dapper +++ b/scripts/installer/kexec/Dockerfile.dapper @@ -1,8 +1,12 @@ FROM ubuntu:16.04 # FROM arm64=aarch64/ubuntu:16.04 arm=armhf/ubuntu:16.04 +# get the apt-cacher proxy set +ARG APTPROXY= -RUN apt-get update \ +RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01proxy \ + && cat /etc/apt/apt.conf.d/01proxy \ + && apt-get update \ && apt-get install -yq build-essential autoconf libtool gawk alien fakeroot \ zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev libdevmapper-dev \ module-init-tools \ @@ -30,7 +34,7 @@ RUN mkdir -p /source/dist \ ########## Dapper Configuration ##################### -ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST +ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST APTPROXY #ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_SOURCE /source ENV DAPPER_OUTPUT ./dist From 8d894ba3963e63b4822e1de9611dbcea32ae414e Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 22 Jun 2017 10:15:45 +1000 Subject: [PATCH 07/20] use the registry mirror for integration tests too Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index fd4ce621..a4e24842 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -37,7 +37,7 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox ########## Dapper Configuration ##################### -ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG APTPROXY +ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG APTPROXY ENGINE_REGISTRY_MIRROR ENV DAPPER_DOCKER_SOCKET true ENV DAPPER_SOURCE /go/src/github.com/rancher/os ENV DAPPER_OUTPUT ./bin ./dist ./build/initrd ./build/kernel From 59bd47a0e600c63a15fe4a0dcf7c779d8712c7da Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Fri, 23 Jun 2017 12:12:31 +1000 Subject: [PATCH 08/20] Merge pull request #1922 from sebastien-prudhomme/master Fix OpenStack console log problem #1094 (cherry picked from commit 034073b8abdf32f2e8b93001cae27929bd913dee) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75a760ca..0277377b 100755 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ itest: qcows: cp dist/artifacts/rancheros.iso scripts/images/openstack/ cd scripts/images/openstack && \ - APPEND="console=tty1 printk.devkmsg=on rancher.autologin=ttyS0" \ + APPEND="console=tty1 console=ttyS0,115200n8 printk.devkmsg=on rancher.autologin=ttyS0" \ NAME=openstack ../../../.dapper cd scripts/images/openstack && \ APPEND="console=tty1 rancher.debug=true printk.devkmsg=on notsc clocksource=kvm-clock rancher.network.interfaces.eth0.ipv4ll rancher.cloud_init.datasources=[digitalocean] rancher.autologin=tty1 rancher.autologin=ttyS0" \ From 96b8a83c356ed7651e09d8ff703865c62254d812 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Fri, 23 Jun 2017 12:17:25 +1000 Subject: [PATCH 09/20] cherry-pick Test complicated dhcp with static ip #1915 Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 3 +- netconf/netconf_linux.go | 12 +- scripts/global.cfg | 2 +- scripts/run | 19 ++- tests/common_test.go | 81 +++++++++++- tests/installer_test.go | 154 ++++++++++++++++++++++ trash.conf | 1 + vendor/github.com/gbazil/telnet/LICENSE | 21 +++ vendor/github.com/gbazil/telnet/README.md | 9 ++ vendor/github.com/gbazil/telnet/telnet.go | 81 ++++++++++++ 10 files changed, 367 insertions(+), 16 deletions(-) create mode 100644 vendor/github.com/gbazil/telnet/LICENSE create mode 100644 vendor/github.com/gbazil/telnet/README.md create mode 100644 vendor/github.com/gbazil/telnet/telnet.go diff --git a/Dockerfile.dapper b/Dockerfile.dapper index a4e24842..9f94fe82 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -33,7 +33,8 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox syslinux-common \ vim \ wget \ - xorriso + xorriso \ + telnet ########## Dapper Configuration ##################### diff --git a/netconf/netconf_linux.go b/netconf/netconf_linux.go index c800c899..406f200d 100755 --- a/netconf/netconf_linux.go +++ b/netconf/netconf_linux.go @@ -402,11 +402,6 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error { addrMap := make(map[string]bool) for _, address := range addresses { addrMap[address] = true - log.Infof("Applying %s to %s", address, link.Attrs().Name) - err := applyAddress(address, link, netConf) - if err != nil { - log.Errorf("Failed to apply address %s to %s: %v", address, link.Attrs().Name, err) - } } for _, addr := range existingAddrs { if _, ok := addrMap[addr.IPNet.String()]; !ok { @@ -419,6 +414,13 @@ func applyInterfaceConfig(link netlink.Link, netConf InterfaceConfig) error { } } } + for _, address := range addresses { + log.Infof("Applying %s to %s", address, link.Attrs().Name) + err := applyAddress(address, link, netConf) + if err != nil { + log.Errorf("Failed to apply address %s to %s: %v", address, link.Attrs().Name, err) + } + } // TODO: can we set to default? if netConf.MTU > 0 { diff --git a/scripts/global.cfg b/scripts/global.cfg index 3f0206f6..b9db5a29 100755 --- a/scripts/global.cfg +++ b/scripts/global.cfg @@ -1 +1 @@ -APPEND rancher.autologin=tty1 rancher.autologin=ttyS0 console=tty0 console=ttyS0 printk.devkmsg=on ${APPEND} +APPEND rancher.autologin=tty1 rancher.autologin=ttyS0 console=tty0 rancher.autologin=ttyS1 rancher.console=ttyS1 console=ttyS0 printk.devkmsg=on ${APPEND} diff --git a/scripts/run b/scripts/run index bd230448..2dbed3b8 100755 --- a/scripts/run +++ b/scripts/run @@ -116,6 +116,9 @@ while [ "$#" -gt 0 ]; do # use the bios console, not serial (lets you see syslinux) CONSOLEDISPLAY=1 ;; + --netconsole) + NETCONSOLE=1 + ;; --installed) ./scripts/create-installed INSTALLED=1 @@ -158,6 +161,7 @@ if [ "$APPEND_INIT" != "" ]; then fi if [ "$BOOT_PXE" == "1" ]; then + KERNEL_ARGS="console=tty1 rancher.console=tty1 rancher.autologin=tty1 ${KERNEL_ARGS}" set -ex PIXIECORE=$(which pixiecore) sudo -E $PIXIECORE boot \ @@ -251,15 +255,19 @@ if [ "$QIND" != "1" ]; then HOME=${HOME:-/} fi +# default serial console +DISPLAY_OPTS="-nographic -serial mon:stdio -display none" + if [ "$CONSOLEDISPLAY" == "1" ]; then DISPLAY_OPTS="-curses" -else - # default - DISPLAY_OPTS="-nographic -serial mon:stdio -display none" +fi +if [ "$NETCONSOLE" == "1" ]; then + # put ttyS1 on port 4444 + DISPLAY_OPTS="${DISPLAY_OPTS} -serial tcp::4444,server" + KERNEL_ARGS="rancher.console=ttyS1 rancher.autologin=ttyS1 ${KERNEL_ARGS}" fi if [ "$QEMU" == "1" ]; then - if [ "$INSTALLED" == "1" ]; then # kernel args only works when using -kernel KERNEL_ARGS="" @@ -307,7 +315,8 @@ elif [ "$BOOT_ISO" == "1" ] || $(eval "${hd["$ARCH"]} ${HD}") \ ${SECOND_DRIVE_ENABLE} \ -smp 1 \ - ${ISO_OPTS} + ${ISO_OPTS} \ + "${@}" elif [ "$QIND" == "1" ]; then NAME=${NAME:-ros-qind} diff --git a/tests/common_test.go b/tests/common_test.go index 9d6f9d0c..6e34eed4 100755 --- a/tests/common_test.go +++ b/tests/common_test.go @@ -9,6 +9,8 @@ import ( "testing" "time" + "github.com/gbazil/telnet" + . "gopkg.in/check.v1" ) @@ -41,6 +43,7 @@ type QemuSuite struct { runCommand string sshCommand string qemuCmd *exec.Cmd + netConsole telnet.Telnet } func (s *QemuSuite) TearDownTest(c *C) { @@ -54,6 +57,9 @@ func (s *QemuSuite) RunQemuWith(c *C, additionalArgs ...string) error { err := s.runQemu(c, additionalArgs...) c.Assert(err, IsNil) + err = s.WaitForSSH() + c.Assert(err, IsNil) + return err } @@ -82,6 +88,71 @@ func (s *QemuSuite) RunQemuInstalled(c *C, additionalArgs ...string) error { return err } +// RunQemuWithNetConsole requires user to specify all the `scripts/run` arguments +func (s *QemuSuite) RunQemuWithNetConsole(c *C, additionalArgs ...string) error { + runArgs := []string{ + "--netconsole", + } + runArgs = append(runArgs, additionalArgs...) + + err := s.runQemu(c, runArgs...) + c.Assert(err, IsNil) + + time.Sleep(500 * time.Millisecond) + // start telnet, and wait for prompt + for i := 0; i < 20; i++ { + s.netConsole, err = telnet.DialTimeout("127.0.0.1:4444", 5*time.Second) + if err == nil { + fmt.Printf("t%d SUCCEEDED\n", i) + break + } + fmt.Printf("t%d", i) + time.Sleep(500 * time.Millisecond) + } + c.Assert(err, IsNil) + + for i := 0; i < 20; i++ { + time.Sleep(1 * time.Second) + + res := s.NetCall("uname") + if strings.Contains(res, "Linux") { + fmt.Printf("W%d SUCCEEDED(%s)\n", i, res) + break + } + } + + s.NetCall("ip a") + s.NetCall("cat /proc/cmdline") + + return err +} + +func (s *QemuSuite) NetCall(cmd string) string { + s.netConsole.Write(cmd + "\n") + r, err := s.netConsole.Read("\n") + fmt.Printf("cmd> %s", r) + result := "" + r = "" + for err == nil { + r, err = s.netConsole.Read("\n") + fmt.Printf("\t%s", r) + result = result + r + } + fmt.Printf("\n") + // Note, if the result contains something like "+ cmd\n", you may have set -xe on + return result +} +func (s *QemuSuite) NetCheckCall(c *C, additionalArgs ...string) { + out := s.NetCall(strings.Join(additionalArgs, " ")) + c.Assert(out, Not(Equals), "") +} +func (s *QemuSuite) NetCheckOutput(c *C, result string, check Checker, additionalArgs ...string) string { + out := s.NetCall(strings.Join(additionalArgs, " ")) + out = strings.Replace(out, "\r", "", -1) + c.Assert(out, check, result) + return out +} + func (s *QemuSuite) runQemu(c *C, args ...string) error { c.Assert(s.qemuCmd, IsNil) // can't run 2 qemu's at once (yet) s.qemuCmd = exec.Command(s.runCommand, args...) @@ -94,7 +165,7 @@ func (s *QemuSuite) runQemu(c *C, args ...string) error { } fmt.Printf("--- %s: starting qemu %s, %v\n", c.TestName(), s.runCommand, args) - return s.WaitForSSH() + return nil } func (s *QemuSuite) WaitForSSH() error { @@ -171,12 +242,14 @@ func (s *QemuSuite) CheckOutputContains(c *C, result string, additionalArgs ...s } func (s *QemuSuite) Stop(c *C) { - //s.MakeCall("sudo halt") - //time.Sleep(2000 * time.Millisecond) + fmt.Printf("%s: stopping qemu\n", c.TestName()) + //s.MakeCall("sudo poweroff") + time.Sleep(1000 * time.Millisecond) //c.Assert(s.WaitForSSH(), IsNil) - //fmt.Println("%s: stopping qemu", c.TestName()) + fmt.Printf("%s: stopping qemu 2\n", c.TestName()) c.Assert(s.qemuCmd.Process.Kill(), IsNil) + fmt.Printf("%s: stopping qemu 3\n", c.TestName()) s.qemuCmd.Process.Wait() //time.Sleep(time.Millisecond * 1000) s.qemuCmd = nil diff --git a/tests/installer_test.go b/tests/installer_test.go index 22a7fde6..cd76edd7 100755 --- a/tests/installer_test.go +++ b/tests/installer_test.go @@ -2,6 +2,7 @@ package integration import ( "fmt" + "strings" "time" . "gopkg.in/check.v1" @@ -117,3 +118,156 @@ sync s.CheckOutput(c, version, Equals, "sudo ros -v") s.Stop(c) } + +func (s *QemuSuite) TestAutoResize(c *C) { + runArgs := []string{ + "--iso", + "--fresh", + } + version := "" + disk := "/dev/vda1\n" + size := "" + { + s.RunQemuWith(c, runArgs...) + + version = s.CheckOutput(c, version, Not(Equals), "sudo ros -v") + fmt.Printf("installing %s", version) + + s.CheckCall(c, ` +set -ex +echo "ssh_authorized_keys:" > config.yml +echo " - $(cat /home/rancher/.ssh/authorized_keys)" >> config.yml +sudo ros install --force --no-reboot --device /dev/vda -c config.yml --append "rancher.resize_device=/dev/vda" +sync +`) + time.Sleep(500 * time.Millisecond) + s.CheckCall(c, "sudo mount "+strings.TrimSpace(disk)+" /mnt") + size = s.CheckOutput(c, size, Not(Equals), "df -h | grep "+strings.TrimSpace(disk)+" | head -n1 | sed 's/ \\+/;/g' | cut -d ';' -f 2") + s.Stop(c) + } + + // ./scripts/run --no-format --append "rancher.debug=true" + runArgs = []string{ + "--boothd", + "--resizehd", "+20G", + } + s.RunQemuWith(c, runArgs...) + + s.CheckOutput(c, version, Equals, "sudo ros -v") + s.CheckOutput(c, disk, Equals, "blkid | cut -f 1 -d ' ' | sed 's/://'") + s.CheckOutput(c, size, Not(Equals), "df -h | grep "+strings.TrimSpace(disk)+" | head -n1 | sed 's/ \\+/;/g' | cut -d ';' -f 2") + + s.Stop(c) +} + +func (s *QemuSuite) KillsMyServerTestInstalledDhcp(c *C) { + // ./scripts/run --no-format --append "rancher.debug=true" --iso --fresh + runArgs := []string{ + "--iso", + "--fresh", + // "-net", "nic,vlan=0,model=virtio", + // "-net", "user,vlan=0", + // "-net", "nic,vlan=0,model=virtio", + // "-net", "user,vlan=0", + } + version := "" + { + s.RunQemuWith(c, runArgs...) + + s.MakeCall("ip a") + + version = s.CheckOutput(c, version, Not(Equals), "sudo ros -v") + fmt.Printf("installing %s", version) + + s.CheckCall(c, ` +echo "ssh_authorized_keys:" > config.yml +echo " - $(cat /home/rancher/.ssh/authorized_keys)" >> config.yml +echo "rancher:" >> config.yml +echo " network:" >> config.yml +echo " interfaces:" >> config.yml +echo " eth2:" >> config.yml +echo " dhcp: true" >> config.yml +echo " eth1:" >> config.yml +echo " address: 10.0.2.253/24" >> config.yml +echo " dhcp: false" >> config.yml +echo " gateway: 10.0.2.1" >> config.yml +echo " mtu: 1500" >> config.yml +ip a +echo "===================" +cat config.yml | sudo ros config merge +sudo ros service stop network +sleep 1 +sudo ros service start network +sleep 1 +ip a +echo "===================" +sudo ros install --force --no-reboot --device /dev/vda -c config.yml -a "console=ttyS0 rancher.console=ttyS0 rancher.autologin=ttyS0 rancher.console=ttyS1 rancher.autologin=ttyS1 rancher.debug=true" +sync +`) + time.Sleep(500 * time.Millisecond) + s.Stop(c) + } + + runArgs = []string{ + "--boothd", + "-net", "nic,vlan=0,model=virtio", + "-net", "user,vlan=0", + "-net", "nic,vlan=0,model=virtio", + "-net", "user,vlan=0", + } + s.RunQemuWithNetConsole(c, runArgs...) + + s.NetCheckOutput(c, version, Equals, "sudo ros -v") + s.NetCheckOutput(c, "", Not(Equals), "sh", "-c", "ip a show eth1 | grep 10.0.2..253") + s.Stop(c) +} + +func (s *QemuSuite) TestConfigDhcp(c *C) { + runArgs := []string{ + "--iso", + "--fresh", + "-net", "nic,vlan=0,model=virtio", + "-net", "user,vlan=0", + "-net", "nic,vlan=0,model=virtio", + "-net", "user,vlan=0", + } + version := "" + { + s.RunQemuWithNetConsole(c, runArgs...) + + s.NetCall("ip a") + + version = s.NetCheckOutput(c, version, Not(Equals), "sudo ros -v") + fmt.Printf("installing %s", version) + + s.NetCheckCall(c, ` +echo "ssh_authorized_keys:" > config.yml +echo " - $(cat /home/rancher/.ssh/authorized_keys)" >> config.yml +echo "rancher:" >> config.yml +echo " network:" >> config.yml +echo " interfaces:" >> config.yml +echo " eth2:" >> config.yml +echo " dhcp: true" >> config.yml +echo " eth1:" >> config.yml +echo " address: 10.0.2.253/24" >> config.yml +echo " dhcp: false" >> config.yml +echo " gateway: 10.0.2.1" >> config.yml +echo " mtu: 1500" >> config.yml +ip a +echo "===================" +cat config.yml | sudo ros config merge +sudo ros service stop network +sleep 1 +sudo ros service start network +sleep 1 +echo "===================" +sudo system-docker logs network +echo "===================" +ip a +`) + + s.NetCheckOutput(c, version, Equals, "sudo ros -v") + s.NetCheckOutput(c, "", Not(Equals), "sh", "-c", "\"ip a show eth1 | grep 10.0.2.253\"") + s.Stop(c) + } +} diff --git a/trash.conf b/trash.conf index b195b949..b93f2ed5 100644 --- a/trash.conf +++ b/trash.conf @@ -59,3 +59,4 @@ golang.org/x/sys eb2c74142fd19a79b3f237334c7384d5167b1b46 https://github.com/gol google.golang.org/grpc ab0be5212fb225475f2087566eded7da5d727960 https://github.com/grpc/grpc-go.git gopkg.in/fsnotify.v1 v1.2.0 github.com/fatih/structs dc3312cb1a4513a366c4c9e622ad55c32df12ed3 +github.com/gbazil/telnet ba7da85c947a39063cddb0ffbff20b6bbbe9222f diff --git a/vendor/github.com/gbazil/telnet/LICENSE b/vendor/github.com/gbazil/telnet/LICENSE new file mode 100644 index 00000000..bb0dc4da --- /dev/null +++ b/vendor/github.com/gbazil/telnet/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016 Vasily Suvorov + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/github.com/gbazil/telnet/README.md b/vendor/github.com/gbazil/telnet/README.md new file mode 100644 index 00000000..0e83318c --- /dev/null +++ b/vendor/github.com/gbazil/telnet/README.md @@ -0,0 +1,9 @@ +# telnet + +[© Vasily Suvorov 2016](http://bazil.pro) + +#### DESCRIPTION + +Package telnet provides very simple interface for interacting with telnet devices from golang's routines. + +[![GoDoc](https://godoc.org/github.com/gbazil/telnet?status.svg)](https://godoc.org/github.com/gbazil/telnet) diff --git a/vendor/github.com/gbazil/telnet/telnet.go b/vendor/github.com/gbazil/telnet/telnet.go new file mode 100644 index 00000000..5e00214d --- /dev/null +++ b/vendor/github.com/gbazil/telnet/telnet.go @@ -0,0 +1,81 @@ +// Package telnet provides very simple interface for interacting with telnet devices from go routines. +package telnet + +import ( + "bufio" + "bytes" + "net" + "strings" + "time" +) + +// Telnet presents struct with net.Conn interface for telnet protocol plus buffered reader and timeout setup +type Telnet struct { + conn net.Conn + reader *bufio.Reader + timeout time.Duration +} + +// Dial constructs connection to a telnet device. Address string must be in format: "ip:port" (e.g. "127.0.0.1:23"). +// Default timeout is set to 5 seconds. +func Dial(addr string) (t Telnet, err error) { + t.conn, err = net.Dial("tcp", addr) + + if err == nil { + t.reader = bufio.NewReader(t.conn) + t.timeout = time.Second * 5 // default + } + + return +} + +// DialTimeout acts like Dial but takes a specific timeout (in nanoseconds). +func DialTimeout(addr string, timeout time.Duration) (t Telnet, err error) { + t.conn, err = net.DialTimeout("tcp", addr, timeout) + + if err == nil { + t.reader = bufio.NewReader(t.conn) + t.timeout = timeout + } + + return +} + +// Read reads all data into string from telnet device until it meets the expected or stops on timeout. +func (t Telnet) Read(expect string) (str string, err error) { + var buf bytes.Buffer + t.conn.SetReadDeadline(time.Now().Add(t.timeout)) + + for { + b, e := t.reader.ReadByte() + if e != nil { + err = e + break + } + + if b == 255 { + t.reader.Discard(2) + } else { + buf.WriteByte(b) + } + + if strings.Contains(buf.String(), expect) { + str = buf.String() + break + } + } + + return +} + +// Write writes string (command or data) to telnet device. Do not forget add LF to end of string! +func (t Telnet) Write(s string) (i int, err error) { + t.conn.SetWriteDeadline(time.Now().Add(t.timeout)) + i, err = t.conn.Write([]byte(s)) + return +} + +// SetTimeout changes default or start timeout for all interactions +func (t Telnet) SetTimeout(timeout time.Duration) { + t.timeout = timeout +} From 9106a97f340e91b09bc9b2ac502fb2da88539aa9 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 22 Jun 2017 12:44:18 +1000 Subject: [PATCH 10/20] Fix ElideCmdline test by making it more robust Signed-off-by: Sven Dowideit --- tests/cmdline_test.go | 17 ++++++++++------- tests/installer_test.go | 42 ----------------------------------------- 2 files changed, 10 insertions(+), 49 deletions(-) diff --git a/tests/cmdline_test.go b/tests/cmdline_test.go index fd007c24..04c9c1ff 100755 --- a/tests/cmdline_test.go +++ b/tests/cmdline_test.go @@ -1,7 +1,11 @@ package integration -import . "gopkg.in/check.v1" -import "fmt" +import ( + . "gopkg.in/check.v1" + + "fmt" + "strings" +) func (s *QemuSuite) TestElideCmdLine(c *C) { extra := "cc.hostname=nope rancher.password=three" @@ -15,11 +19,10 @@ func (s *QemuSuite) TestElideCmdLine(c *C) { s.RunQemuWith(c, runArgs...) s.CheckOutput(c, "nope\n", Equals, "hostname") - s.CheckOutput(c, - "printk.devkmsg=on rancher.debug=true rancher.password=rancher console=ttyS0 rancher.autologin=ttyS0 cc.something=yes rancher.password=two rancher.state.dev=LABEL=RANCHER_STATE rancher.state.autoformat=[/dev/sda,/dev/vda] rancher.rm_usr -- \n", - Equals, - "cat /proc/cmdline", - ) + cmdline := s.CheckOutput(c, "", Not(Equals), "cat /proc/cmdline") + if strings.Contains(cmdline, extra) { + c.Errorf("/proc/cmdline (%s) contains info that should be elided (%s)", cmdline, extra) + } s.CheckOutput(c, fmt.Sprintf("/init %s\n", extra), Equals, diff --git a/tests/installer_test.go b/tests/installer_test.go index cd76edd7..cbe01719 100755 --- a/tests/installer_test.go +++ b/tests/installer_test.go @@ -2,7 +2,6 @@ package integration import ( "fmt" - "strings" "time" . "gopkg.in/check.v1" @@ -119,47 +118,6 @@ sync s.Stop(c) } -func (s *QemuSuite) TestAutoResize(c *C) { - runArgs := []string{ - "--iso", - "--fresh", - } - version := "" - disk := "/dev/vda1\n" - size := "" - { - s.RunQemuWith(c, runArgs...) - - version = s.CheckOutput(c, version, Not(Equals), "sudo ros -v") - fmt.Printf("installing %s", version) - - s.CheckCall(c, ` -set -ex -echo "ssh_authorized_keys:" > config.yml -echo " - $(cat /home/rancher/.ssh/authorized_keys)" >> config.yml -sudo ros install --force --no-reboot --device /dev/vda -c config.yml --append "rancher.resize_device=/dev/vda" -sync -`) - time.Sleep(500 * time.Millisecond) - s.CheckCall(c, "sudo mount "+strings.TrimSpace(disk)+" /mnt") - size = s.CheckOutput(c, size, Not(Equals), "df -h | grep "+strings.TrimSpace(disk)+" | head -n1 | sed 's/ \\+/;/g' | cut -d ';' -f 2") - s.Stop(c) - } - - // ./scripts/run --no-format --append "rancher.debug=true" - runArgs = []string{ - "--boothd", - "--resizehd", "+20G", - } - s.RunQemuWith(c, runArgs...) - - s.CheckOutput(c, version, Equals, "sudo ros -v") - s.CheckOutput(c, disk, Equals, "blkid | cut -f 1 -d ' ' | sed 's/://'") - s.CheckOutput(c, size, Not(Equals), "df -h | grep "+strings.TrimSpace(disk)+" | head -n1 | sed 's/ \\+/;/g' | cut -d ';' -f 2") - - s.Stop(c) -} - func (s *QemuSuite) KillsMyServerTestInstalledDhcp(c *C) { // ./scripts/run --no-format --append "rancher.debug=true" --iso --fresh runArgs := []string{ From 49e4315251e7ea52e1cf9ee5dea8f35aa8eaea1a Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 21 Jun 2017 03:29:50 +0000 Subject: [PATCH 11/20] Try SSP_ALL glibc buildroot Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 9f94fe82..819f2af6 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -80,9 +80,9 @@ ARG OS_SERVICES_REPO=https://raw.githubusercontent.com/${OS_REPO}/os-services ARG IMAGE_NAME=${OS_REPO}/os ARG DFS_IMAGE=${OS_REPO}/docker:v${DOCKER_VERSION}-2 -ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2017.02.3-1/os-base_amd64.tar.xz -ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2017.02.3-1/os-base_arm64.tar.xz -ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2017.02.3-1/os-base_arm.tar.xz +ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp-all/os-base_amd64.tar.xz +ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp.all/os-base_arm64.tar.xz +ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp.all/os-base_arm.tar.xz ###################################################### # Set up environment and export all ARGS as ENV From af60ac579856b857177f39cb1a4af655c44b76d7 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Wed, 21 Jun 2017 03:38:46 +0000 Subject: [PATCH 12/20] Linux 4.9.33 Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 819f2af6..d970df73 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -62,7 +62,7 @@ ARG DOCKER_BUILD_VERSION=1.10.3 ARG DOCKER_BUILD_PATCH_VERSION=v${DOCKER_BUILD_VERSION}-ros1 ARG SELINUX_POLICY_URL=https://github.com/rancher/refpolicy/releases/download/v0.0.3/policy.29 -ARG KERNEL_VERSION_amd64=4.9.30-rancher +ARG KERNEL_VERSION_amd64=4.9.33-rancher ARG KERNEL_URL_amd64=https://github.com/rancher/os-kernel/releases/download/v${KERNEL_VERSION_amd64}/linux-${KERNEL_VERSION_amd64}-x86.tar.gz ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.4.0-arm64.8/linux-4.4.0-rancher-arm64.tar.gz From ecd2853bdbebea714f6f8b93641d6ff47dfb3a52 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 22 Jun 2017 10:59:44 +1000 Subject: [PATCH 13/20] use linux 4.9.34rc for now Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index d970df73..f72c0a1b 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -62,7 +62,7 @@ ARG DOCKER_BUILD_VERSION=1.10.3 ARG DOCKER_BUILD_PATCH_VERSION=v${DOCKER_BUILD_VERSION}-ros1 ARG SELINUX_POLICY_URL=https://github.com/rancher/refpolicy/releases/download/v0.0.3/policy.29 -ARG KERNEL_VERSION_amd64=4.9.33-rancher +ARG KERNEL_VERSION_amd64=4.9.33-rancher-4.9.34rc ARG KERNEL_URL_amd64=https://github.com/rancher/os-kernel/releases/download/v${KERNEL_VERSION_amd64}/linux-${KERNEL_VERSION_amd64}-x86.tar.gz ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.4.0-arm64.8/linux-4.4.0-rancher-arm64.tar.gz @@ -81,8 +81,8 @@ ARG IMAGE_NAME=${OS_REPO}/os ARG DFS_IMAGE=${OS_REPO}/docker:v${DOCKER_VERSION}-2 ARG OS_BASE_URL_amd64=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp-all/os-base_amd64.tar.xz -ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp.all/os-base_arm64.tar.xz -ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp.all/os-base_arm.tar.xz +ARG OS_BASE_URL_arm64=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp-all/os-base_arm64.tar.xz +ARG OS_BASE_URL_arm=https://github.com/rancher/os-base/releases/download/v2017.02.3-glibc-ssp-all/os-base_arm.tar.xz ###################################################### # Set up environment and export all ARGS as ENV From 2bbd3b375a20f781c1694ac19c6b769b19f09ce9 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Fri, 23 Jun 2017 11:47:24 +1000 Subject: [PATCH 14/20] Use v4.9.33-rancher-ssp1 Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index f72c0a1b..85a4c091 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -62,7 +62,7 @@ ARG DOCKER_BUILD_VERSION=1.10.3 ARG DOCKER_BUILD_PATCH_VERSION=v${DOCKER_BUILD_VERSION}-ros1 ARG SELINUX_POLICY_URL=https://github.com/rancher/refpolicy/releases/download/v0.0.3/policy.29 -ARG KERNEL_VERSION_amd64=4.9.33-rancher-4.9.34rc +ARG KERNEL_VERSION_amd64=4.9.33-rancher-ssp1 ARG KERNEL_URL_amd64=https://github.com/rancher/os-kernel/releases/download/v${KERNEL_VERSION_amd64}/linux-${KERNEL_VERSION_amd64}-x86.tar.gz ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.4.0-arm64.8/linux-4.4.0-rancher-arm64.tar.gz From 6c6d23b6498101a1858e8a223907f9af60a1fe7f Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Fri, 23 Jun 2017 21:51:38 +1000 Subject: [PATCH 15/20] Merge pull request #1940 from SvenDowideit/os-1643-vfat-config-drive Add test for vfat formatted config drive (cherry picked from commit a2e3c9aa50d7c271cdb312af4f97a11222020340) --- Dockerfile.dapper | 1 + scripts/run | 6 ++++-- tests/cloud_init_test.go | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 9f94fe82..65c27a49 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -24,6 +24,7 @@ RUN echo "Acquire::http { Proxy \"$APTPROXY\"; };" >> /etc/apt/apt.conf.d/01prox libselinux1-dev \ locales \ module-init-tools \ + mtools \ openssh-client \ pkg-config \ qemu \ diff --git a/scripts/run b/scripts/run index 2dbed3b8..0bd36346 100755 --- a/scripts/run +++ b/scripts/run @@ -242,8 +242,10 @@ if [ "$QIND" != "1" ]; then CLOUD_CONFIG_DISK="-cdrom ${BASE}/state/configdrive.iso" ;; fat) - echo "TODO: implement a vfat formated qemu img & copy the config files into it" - exit 1 + truncate --size 2M ${BASE}/state/configdrive.img + mkfs.vfat -n config-2 ${BASE}/state/configdrive.img + mcopy -osi ${BASE}/state/configdrive.img ${CCROOT}/* :: + CLOUD_CONFIG_DISK="-hdb ${BASE}/state/configdrive.img" ;; *) CLOUD_CONFIG_DISK="-fsdev local,security_model=passthrough,readonly,id=fsdev0,path=${CCROOT} \ diff --git a/tests/cloud_init_test.go b/tests/cloud_init_test.go index 756a4254..a83f854e 100644 --- a/tests/cloud_init_test.go +++ b/tests/cloud_init_test.go @@ -28,3 +28,13 @@ func (s *QemuSuite) TestIsoCloudConfig(c *C) { s.CheckCall(c, `ls .ssh/authorized_keys`) } + +func (s *QemuSuite) TestFatCloudConfig(c *C) { + runArgs := []string{ + "--fresh", + "--cloud-config-fat", + } + s.RunQemuWith(c, runArgs...) + + s.CheckCall(c, `ls .ssh/authorized_keys`) +} From 260379d2b7ffd873553e3a464a0454f42cfce567 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Mon, 26 Jun 2017 10:59:16 +1000 Subject: [PATCH 16/20] Merge pull request #1943 from mitchese/rpi-fix-1942 Increasing raspberry image to 2G (cherry picked from commit fb96c470a91485df5ddc64b3521ae67e4d9d30c8) --- scripts/images/raspberry-pi-hypriot/scripts/build.sh | 2 +- scripts/images/raspberry-pi-hypriot64/scripts/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/images/raspberry-pi-hypriot/scripts/build.sh b/scripts/images/raspberry-pi-hypriot/scripts/build.sh index 9be4198d..dfd7af49 100755 --- a/scripts/images/raspberry-pi-hypriot/scripts/build.sh +++ b/scripts/images/raspberry-pi-hypriot/scripts/build.sh @@ -11,7 +11,7 @@ cp assets/*.deb build/ #---build SD card image--- # size of root and boot partion (in MByte) -IMAGE_TOTAL_SIZE=500 +IMAGE_TOTAL_SIZE=2048 BOOT_PARTITION_START=2048 BOOT_PARTITION_SIZE=25 #---don't change here--- diff --git a/scripts/images/raspberry-pi-hypriot64/scripts/build.sh b/scripts/images/raspberry-pi-hypriot64/scripts/build.sh index c3724f45..51814f6e 100755 --- a/scripts/images/raspberry-pi-hypriot64/scripts/build.sh +++ b/scripts/images/raspberry-pi-hypriot64/scripts/build.sh @@ -11,7 +11,7 @@ cp assets/*.tar.gz build/ #---build SD card image--- # size of root and boot partion (in MByte) -IMAGE_TOTAL_SIZE=500 +IMAGE_TOTAL_SIZE=2048 BOOT_PARTITION_START=2048 BOOT_PARTITION_SIZE=25 #---don't change here--- From b328ecaec3f58c0409e874a20fcb97c31c0bd4f6 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Mon, 26 Jun 2017 01:29:49 +0000 Subject: [PATCH 17/20] Fix Makefile Signed-off-by: Sven Dowideit --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0277377b..aa07196e 100755 --- a/Makefile +++ b/Makefile @@ -58,6 +58,7 @@ rpi: # scripts/images/raspberry-pi-hypriot/dist/rancheros-raspberry-pi.zip cp dist/artifacts/rootfs_arm.tar.gz scripts/images/raspberry-pi-hypriot/ cd scripts/images/raspberry-pi-hypriot/ \ + && ../../../.dapper rpi64: # scripts/images/raspberry-pi-hypriot64/dist/rancheros-raspberry-pi.zip From 487610f6c5d3b3dada80d8409890e195dfb851a7 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Mon, 26 Jun 2017 13:40:00 +1000 Subject: [PATCH 18/20] linux 4.9.34 for amd64 and arm64 Signed-off-by: Sven Dowideit --- Dockerfile.dapper | 4 ++-- scripts/images/raspberry-pi-hypriot64/Dockerfile.dapper | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 63d0011a..1e009073 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -63,9 +63,9 @@ ARG DOCKER_BUILD_VERSION=1.10.3 ARG DOCKER_BUILD_PATCH_VERSION=v${DOCKER_BUILD_VERSION}-ros1 ARG SELINUX_POLICY_URL=https://github.com/rancher/refpolicy/releases/download/v0.0.3/policy.29 -ARG KERNEL_VERSION_amd64=4.9.33-rancher-ssp1 +ARG KERNEL_VERSION_amd64=4.9.34-rancher ARG KERNEL_URL_amd64=https://github.com/rancher/os-kernel/releases/download/v${KERNEL_VERSION_amd64}/linux-${KERNEL_VERSION_amd64}-x86.tar.gz -ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.4.0-arm64.8/linux-4.4.0-rancher-arm64.tar.gz +#ARG KERNEL_URL_arm64=https://github.com/imikushin/os-kernel/releases/download/Estuary-4.4.0-arm64.8/linux-4.4.0-rancher-arm64.tar.gz ARG DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-${DOCKER_VERSION}.tgz ARG DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/${DOCKER_PATCH_VERSION}/docker-${DOCKER_VERSION}_arm.tgz diff --git a/scripts/images/raspberry-pi-hypriot64/Dockerfile.dapper b/scripts/images/raspberry-pi-hypriot64/Dockerfile.dapper index 137c6bec..5487c4f0 100644 --- a/scripts/images/raspberry-pi-hypriot64/Dockerfile.dapper +++ b/scripts/images/raspberry-pi-hypriot64/Dockerfile.dapper @@ -12,12 +12,12 @@ RUN mkdir -p /source/assets #RUN curl -fL https://releases.rancher.com/os/latest/rootfs_arm64.tar.gz > /source/assets/rootfs_arm64.tar.gz COPY rootfs_arm64.tar.gz /source/assets/rootfs_arm64.tar.gz -ENV URL=https://github.com/DieterReuter/rpi64-kernel/releases/download -ENV VER=v20170303-160601 +ENV URL=https://github.com/SvenDowideit/rpi64-kernel/releases/download +ENV VER=v20170626-014036 -RUN curl -fL ${URL}/${VER}/4.9.13-bee42-v8.tar.gz > /source/assets/kernel.tar.gz +RUN curl -fL ${URL}/${VER}/4.9.34-bee42-v8.tar.gz > /source/assets/kernel.tar.gz RUN curl -fL ${URL}/${VER}/bootfiles.tar.gz > /source/assets/bootfiles.tar.gz -RUN curl -fL https://github.com/DieterReuter/rpi-bootloader/releases/download/v20170303-133934/rpi-bootloader.tar.gz > /source/assets/rpi-bootfiles.tar.gz +RUN curl -fL https://github.com/SvenDowideit/rpi-bootloader/releases/download/v20170622-085322/rpi-bootloader.tar.gz > /source/assets/rpi-bootfiles.tar.gz #ENV RPI_URL=https://github.com/raspberrypi/firmware/raw/master/boot #RUN curl -fL ${RPI_URL}/bootcode.bin > /source/assets/bootcode.bin From cdb26fac99c89366d81dfd38319fea14c4d22a80 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 27 Jun 2017 10:22:38 +1000 Subject: [PATCH 19/20] Update v1.0.3 links Signed-off-by: Sven Dowideit --- README.md | 68 ++++++++++++++++++------------------- docs/os/amazon-ecs/index.md | 30 ++++++++-------- 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 33f0086e..d57b02b7 100644 --- a/README.md +++ b/README.md @@ -14,40 +14,40 @@ it would really be bad if somebody did `docker rm -f $(docker ps -qa)` and delet ## Latest Release -**v1.0.2 - Docker 17.03.1-ce - Linux 4.9.30** +**v1.0.3 - Docker 17.03.1-ce - Linux 4.9.34** ### ISO - https://releases.rancher.com/os/latest/rancheros.iso -- https://releases.rancher.com/os/v1.0.2/rancheros.iso +- https://releases.rancher.com/os/v1.0.3/rancheros.iso ### Additional Downloads #### Latest Links * https://releases.rancher.com/os/latest/initrd -* https://releases.rancher.com/os/latest/initrd-v1.0.2 +* https://releases.rancher.com/os/latest/initrd-v1.0.3 * https://releases.rancher.com/os/latest/iso-checksums.txt * https://releases.rancher.com/os/latest/rancheros-openstack.img * https://releases.rancher.com/os/latest/rancheros.ipxe * https://releases.rancher.com/os/latest/rancheros.iso -* https://releases.rancher.com/os/latest/rancheros-v1.0.2.tar.gz +* https://releases.rancher.com/os/latest/rancheros-v1.0.3.tar.gz * https://releases.rancher.com/os/latest/rootfs.tar.gz * https://releases.rancher.com/os/latest/vmlinuz -* https://releases.rancher.com/os/latest/vmlinuz-4.9.30-rancher +* https://releases.rancher.com/os/latest/vmlinuz-4.9.34-rancher -#### v1.0.2 Links +#### v1.0.3 Links -* https://releases.rancher.com/os/v1.0.2/initrd -* https://releases.rancher.com/os/v1.0.2/initrd-v1.0.2 -* https://releases.rancher.com/os/v1.0.2/iso-checksums.txt -* https://releases.rancher.com/os/v1.0.2/rancheros-openstack.img -* https://releases.rancher.com/os/v1.0.2/rancheros.ipxe -* https://releases.rancher.com/os/v1.0.2/rancheros.iso -* https://releases.rancher.com/os/v1.0.2/rancheros-v1.0.2.tar.gz -* https://releases.rancher.com/os/v1.0.2/rootfs.tar.gz -* https://releases.rancher.com/os/v1.0.2/vmlinuz -* https://releases.rancher.com/os/v1.0.2/vmlinuz-4.9.40-rancher +* https://releases.rancher.com/os/v1.0.3/initrd +* https://releases.rancher.com/os/v1.0.3/initrd-v1.0.3 +* https://releases.rancher.com/os/v1.0.3/iso-checksums.txt +* https://releases.rancher.com/os/v1.0.3/rancheros-openstack.img +* https://releases.rancher.com/os/v1.0.3/rancheros.ipxe +* https://releases.rancher.com/os/v1.0.3/rancheros.iso +* https://releases.rancher.com/os/v1.0.3/rancheros-v1.0.3.tar.gz +* https://releases.rancher.com/os/v1.0.3/rootfs.tar.gz +* https://releases.rancher.com/os/v1.0.3/vmlinuz +* https://releases.rancher.com/os/v1.0.3/vmlinuz-4.9.34-rancher #### ARM Links @@ -56,10 +56,10 @@ it would really be bad if somebody did `docker rm -f $(docker ps -qa)` and delet * https://releases.rancher.com/os/latest/rancheros-raspberry-pi.zip * https://releases.rancher.com/os/latest/rancheros-raspberry-pi64.zip -* https://releases.rancher.com/os/v1.0.2/rootfs_arm.tar.gz -* https://releases.rancher.com/os/v1.0.2/rootfs_arm64.tar.gz -* https://releases.rancher.com/os/v1.0.2/rancheros-raspberry-pi.zip -* https://releases.rancher.com/os/v1.0.2/rancheros-raspberry-pi64.zip +* https://releases.rancher.com/os/v1.0.3/rootfs_arm.tar.gz +* https://releases.rancher.com/os/v1.0.3/rootfs_arm64.tar.gz +* https://releases.rancher.com/os/v1.0.3/rancheros-raspberry-pi.zip +* https://releases.rancher.com/os/v1.0.3/rancheros-raspberry-pi64.zip **Note**: you can use `http` instead of `https` in the above URLs, e.g. for iPXE. @@ -71,20 +71,20 @@ SSH keys are added to the **`rancher`** user, so you must log in using the **ran Region | Type | AMI | -------|------|------ -ap-south-1 | HVM | [ami-f68cf099](https://ap-south-1.console.aws.amazon.com/ec2/home?region=ap-south-1#launchInstanceWizard:ami=ami-f68cf099) -eu-west-2 | HVM | [ami-86e7f0e2](https://eu-west-2.console.aws.amazon.com/ec2/home?region=eu-west-2#launchInstanceWizard:ami=ami-86e7f0e2) -eu-west-1 | HVM | [ami-13f8e875](https://eu-west-1.console.aws.amazon.com/ec2/home?region=eu-west-1#launchInstanceWizard:ami=ami-13f8e875) -ap-northeast-2 | HVM | [ami-22e33f4c](https://ap-northeast-2.console.aws.amazon.com/ec2/home?region=ap-northeast-2#launchInstanceWizard:ami=ami-22e33f4c) -ap-northeast-1 | HVM | [ami-29e4e44e](https://ap-northeast-1.console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchInstanceWizard:ami=ami-29e4e44e) -sa-east-1 | HVM | [ami-a196ffcd](https://sa-east-1.console.aws.amazon.com/ec2/home?region=sa-east-1#launchInstanceWizard:ami=ami-a196ffcd) -ca-central-1 | HVM | [ami-dc2a96b8](https://ca-central-1.console.aws.amazon.com/ec2/home?region=ca-central-1#launchInstanceWizard:ami=ami-dc2a96b8) -ap-southeast-1 | HVM | [ami-d5f575b6](https://ap-southeast-1.console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchInstanceWizard:ami=ami-d5f575b6) -ap-southeast-2 | HVM | [ami-c2e2f5a1](https://ap-southeast-2.console.aws.amazon.com/ec2/home?region=ap-southeast-2#launchInstanceWizard:ami=ami-c2e2f5a1) -eu-central-1 | HVM | [ami-7d31eb12](https://eu-central-1.console.aws.amazon.com/ec2/home?region=eu-central-1#launchInstanceWizard:ami=ami-7d31eb12) -us-east-1 | HVM | [ami-3e732428](https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#launchInstanceWizard:ami=ami-3e732428) -us-east-2 | HVM | [ami-820f29e7](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#launchInstanceWizard:ami=ami-820f29e7) -us-west-1 | HVM | [ami-d2edceb2](https://us-west-1.console.aws.amazon.com/ec2/home?region=us-west-1#launchInstanceWizard:ami=ami-d2edceb2) -us-west-2 | HVM | [ami-6d1a760d](https://us-west-2.console.aws.amazon.com/ec2/home?region=us-west-2#launchInstanceWizard:ami=ami-6d1a760d) +ap-south-1 | HVM | [ami-3576085a](https://ap-south-1.console.aws.amazon.com/ec2/home?region=ap-south-1#launchInstanceWizard:ami=ami-3576085a) +eu-west-2 | HVM | [ami-4806102c](https://eu-west-2.console.aws.amazon.com/ec2/home?region=eu-west-2#launchInstanceWizard:ami=ami-4806102c) +eu-west-1 | HVM | [ami-64b2a802](https://eu-west-1.console.aws.amazon.com/ec2/home?region=eu-west-1#launchInstanceWizard:ami=ami-64b2a802) +ap-northeast-2 | HVM | [ami-9d03dcf3](https://ap-northeast-2.console.aws.amazon.com/ec2/home?region=ap-northeast-2#launchInstanceWizard:ami=ami-9d03dcf3) +ap-northeast-1 | HVM | [ami-8bb1a7ec](https://ap-northeast-1.console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchInstanceWizard:ami=ami-8bb1a7ec) +sa-east-1 | HVM | [ami-ae1b71c2](https://sa-east-1.console.aws.amazon.com/ec2/home?region=sa-east-1#launchInstanceWizard:ami=ami-ae1b71c2) +ca-central-1 | HVM | [ami-4fa7182b](https://ca-central-1.console.aws.amazon.com/ec2/home?region=ca-central-1#launchInstanceWizard:ami=ami-4fa7182b) +ap-southeast-1 | HVM | [ami-4f921c2c](https://ap-southeast-1.console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchInstanceWizard:ami=ami-4f921c2c) +ap-southeast-2 | HVM | [ami-d64c5fb5](https://ap-southeast-2.console.aws.amazon.com/ec2/home?region=ap-southeast-2#launchInstanceWizard:ami=ami-d64c5fb5) +eu-central-1 | HVM | [ami-8c52f4e3](https://eu-central-1.console.aws.amazon.com/ec2/home?region=eu-central-1#launchInstanceWizard:ami=ami-8c52f4e3) +us-east-1 | HVM | [ami-067c4a10](https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#launchInstanceWizard:ami=ami-067c4a10) +us-east-2 | HVM | [ami-b74b6ad2](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#launchInstanceWizard:ami=ami-b74b6ad2) +us-west-1 | HVM | [ami-04351964](https://us-west-1.console.aws.amazon.com/ec2/home?region=us-west-1#launchInstanceWizard:ami=ami-04351964) +us-west-2 | HVM | [ami-bed0c7c7](https://us-west-2.console.aws.amazon.com/ec2/home?region=us-west-2#launchInstanceWizard:ami=ami-bed0c7c7) Additionally, images are available with support for Amazon EC2 Container Service (ECS) [here](https://docs.rancher.com/os/amazon-ecs/#amazon-ecs-enabled-amis). diff --git a/docs/os/amazon-ecs/index.md b/docs/os/amazon-ecs/index.md index 4b37c683..2c8cf169 100644 --- a/docs/os/amazon-ecs/index.md +++ b/docs/os/amazon-ecs/index.md @@ -62,22 +62,22 @@ rancher: ### Amazon ECS enabled AMIs -Latest Release: [v1.0.0](https://github.com/rancher/os/releases/tag/v1.0.0) +Latest Release: [v1.0.3](https://github.com/rancher/os/releases/tag/v1.0.3) Region | Type | AMI ---|--- | --- -ap-south-1 | HVM - ECS enabled | [ami-0090ec6f](https://ap-south-1.console.aws.amazon.com/ec2/home?region=ap-south-1#launchInstanceWizard:ami=ami-0090ec6f) -eu-west-2 | HVM - ECS enabled | [ami-61fbec05](https://eu-west-2.console.aws.amazon.com/ec2/home?region=eu-west-2#launchInstanceWizard:ami=ami-61fbec05) -eu-west-1 | HVM - ECS enabled | [ami-50f2e236](https://eu-west-1.console.aws.amazon.com/ec2/home?region=eu-west-1#launchInstanceWizard:ami=ami-50f2e236) -ap-northeast-2 | HVM - ECS enabled | [ami-fbe33f95](https://ap-northeast-2.console.aws.amazon.com/ec2/home?region=ap-northeast-2#launchInstanceWizard:ami=ami-fbe33f95) -ap-northeast-1 | HVM - ECS enabled | [ami-fce2e29b](https://ap-northeast-1.console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchInstanceWizard:ami=ami-fce2e29b) -sa-east-1 | HVM - ECS enabled | [ami-bf97fed3](https://sa-east-1.console.aws.amazon.com/ec2/home?region=sa-east-1#launchInstanceWizard:ami=ami-bf97fed3) -ca-central-1 | HVM - ECS enabled | [ami-65209c01](https://ca-central-1.console.aws.amazon.com/ec2/home?region=ca-central-1#launchInstanceWizard:ami=ami-65209c01) -ap-southeast-1 | HVM - ECS enabled | [ami-75f87816](https://ap-southeast-1.console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchInstanceWizard:ami=ami-75f87816) -ap-southeast-2 | HVM - ECS enabled | [ami-2deff84e](https://ap-southeast-2.console.aws.amazon.com/ec2/home?region=ap-southeast-2#launchInstanceWizard:ami=ami-2deff84e) -eu-central-1 | HVM - ECS enabled | [ami-0a30ea65](https://eu-central-1.console.aws.amazon.com/ec2/home?region=eu-central-1#launchInstanceWizard:ami=ami-0a30ea65) -us-east-1 | HVM - ECS enabled | [ami-60742376](https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#launchInstanceWizard:ami=ami-60742376) -us-east-2 | HVM - ECS enabled | [ami-1b0e287e](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#launchInstanceWizard:ami=ami-1b0e287e) -us-west-1 | HVM - ECS enabled | [ami-45efcc25](https://us-west-1.console.aws.amazon.com/ec2/home?region=us-west-1#launchInstanceWizard:ami=ami-45efcc25) -us-west-2 | HVM - ECS enabled | [ami-811b77e1](https://us-west-2.console.aws.amazon.com/ec2/home?region=us-west-2#launchInstanceWizard:ami=ami-811b77e1) +ap-south-1 | HVM - ECS enabled | [ami-f7770998](https://ap-south-1.console.aws.amazon.com/ec2/home?region=ap-south-1#launchInstanceWizard:ami=ami-f7770998) +eu-west-2 | HVM - ECS enabled | [ami-f4041290](https://eu-west-2.console.aws.amazon.com/ec2/home?region=eu-west-2#launchInstanceWizard:ami=ami-f4041290) +eu-west-1 | HVM - ECS enabled | [ami-66b2a800](https://eu-west-1.console.aws.amazon.com/ec2/home?region=eu-west-1#launchInstanceWizard:ami=ami-66b2a800) +ap-northeast-2 | HVM - ECS enabled | [ami-9e03dcf0](https://ap-northeast-2.console.aws.amazon.com/ec2/home?region=ap-northeast-2#launchInstanceWizard:ami=ami-9e03dcf0) +ap-northeast-1 | HVM - ECS enabled | [ami-32b1a755](https://ap-northeast-1.console.aws.amazon.com/ec2/home?region=ap-northeast-1#launchInstanceWizard:ami=ami-32b1a755) +sa-east-1 | HVM - ECS enabled | [ami-e01f758c](https://sa-east-1.console.aws.amazon.com/ec2/home?region=sa-east-1#launchInstanceWizard:ami=ami-e01f758c) +ca-central-1 | HVM - ECS enabled | [ami-cca619a8](https://ca-central-1.console.aws.amazon.com/ec2/home?region=ca-central-1#launchInstanceWizard:ami=ami-cca619a8) +ap-southeast-1 | HVM - ECS enabled | [ami-d79618b4](https://ap-southeast-1.console.aws.amazon.com/ec2/home?region=ap-southeast-1#launchInstanceWizard:ami=ami-d79618b4) +ap-southeast-2 | HVM - ECS enabled | [ami-7d4a591e](https://ap-southeast-2.console.aws.amazon.com/ec2/home?region=ap-southeast-2#launchInstanceWizard:ami=ami-7d4a591e) +eu-central-1 | HVM - ECS enabled | [ami-f653f599](https://eu-central-1.console.aws.amazon.com/ec2/home?region=eu-central-1#launchInstanceWizard:ami=ami-f653f599) +us-east-1 | HVM - ECS enabled | [ami-3a71472c](https://us-east-1.console.aws.amazon.com/ec2/home?region=us-east-1#launchInstanceWizard:ami=ami-3a71472c) +us-east-2 | HVM - ECS enabled | [ami-51466734](https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#launchInstanceWizard:ami=ami-51466734) +us-west-1 | HVM - ECS enabled | [ami-b70f23d7](https://us-west-1.console.aws.amazon.com/ec2/home?region=us-west-1#launchInstanceWizard:ami=ami-b70f23d7) +us-west-2 | HVM - ECS enabled | [ami-3ad2c543](https://us-west-2.console.aws.amazon.com/ec2/home?region=us-west-2#launchInstanceWizard:ami=ami-3ad2c543) From a281a84cca8334104a3451cee91971ad4ef4cd95 Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Tue, 27 Jun 2017 10:35:08 +1000 Subject: [PATCH 20/20] update v1.0.3 CVE info Signed-off-by: Sven Dowideit --- docs/os/security/index.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/os/security/index.md b/docs/os/security/index.md index 5030d113..7341d728 100644 --- a/docs/os/security/index.md +++ b/docs/os/security/index.md @@ -31,5 +31,6 @@ layout: os-default |----|-------------|------|------------| | [CVE-2017-6074](http://seclists.org/oss-sec/2017/q1/471) | Local privilege-escalation using a user after free issue in [Datagram Congestion Control Protocol (DCCP)](https://wiki.linuxfoundation.org/networking/dccp). DCCP is built into the RancherOS kernel as a dynamically loaded module, and isn't loaded by default. | 17 Feb 2017 | [RancherOS v0.8.1](https://github.com/rancher/os/releases/tag/v0.8.1) using a [patched 4.9.12 Linux kernel](https://github.com/rancher/os-kernel/releases/tag/v4.9.12-rancher) | | [CVE-2017-7184](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7184) | Allows local users to obtain root privileges or cause a denial of service (heap-based out-of-bounds access) by leveraging the CAP_NET_ADMIN capability. | 3 April 2017 | [RancherOS v0.9.2-rc1](https://github.com/rancher/os/releases/tag/v0.9.2-rc1) using Linux 4.9.20 | - +| [CVE-2017-1000364](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-1000364) | Linux Kernel is prone to a local memory-corruption vulnerability. Attackers may be able to exploit this issue to execute arbitrary code with elevated privileges | 19 June 2017 | [RancherOS v1.0.3](https://github.com/rancher/os/releases/tag/v1.0.3) | +| [CVE-2017-1000366](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-1000366) | glibc contains a vulnerability that allows manipulation of the heap/stack. Attackers may be able to exploit this issue to execute arbitrary code with elevated privileges | 19 June 2017 | [RancherOS v1.0.3](https://github.com/rancher/os/releases/tag/v1.0.3) |