Compare commits
6 Commits
v0.9.2-rc3
...
v0.9.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f28d658cda | ||
|
|
0816893d97 | ||
|
|
2cbd384229 | ||
|
|
a677b753bc | ||
|
|
5de796c05a | ||
|
|
4997104f70 |
@@ -32,7 +32,7 @@ RUN apt-get update && \
|
||||
|
||||
########## Dapper Configuration #####################
|
||||
|
||||
ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST
|
||||
ENV DAPPER_ENV VERSION DEV_BUILD RUNTEST DEBUG
|
||||
ENV DAPPER_DOCKER_SOCKET true
|
||||
ENV DAPPER_SOURCE /go/src/github.com/rancher/os
|
||||
ENV DAPPER_OUTPUT ./bin ./dist ./build/initrd ./build/kernel
|
||||
@@ -56,7 +56,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.20-rancher
|
||||
ARG KERNEL_VERSION_amd64=4.9.21-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
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/netconf"
|
||||
//"github.com/rancher/os/netconf"
|
||||
|
||||
"github.com/rancher/os/config/cloudinit/datasource"
|
||||
"github.com/rancher/os/config/cloudinit/datasource/metadata"
|
||||
@@ -74,6 +74,7 @@ func (ms MetadataService) FetchMetadata() (datasource.Metadata, error) {
|
||||
SSHPublicKeys: nil,
|
||||
}
|
||||
|
||||
/* Disabled, using DHCP like in pre-0.9.1 - missing gateway and netmask, and testing time
|
||||
addresses := []string{}
|
||||
if public != nil {
|
||||
addresses = append(addresses, public.String())
|
||||
@@ -89,6 +90,7 @@ func (ms MetadataService) FetchMetadata() (datasource.Metadata, error) {
|
||||
md.NetworkConfig.Interfaces = make(map[string]netconf.InterfaceConfig)
|
||||
md.NetworkConfig.Interfaces["eth0"] = network
|
||||
}
|
||||
*/
|
||||
|
||||
keyStrings := strings.Split(projectSSHKeys+"\n"+instanceSSHKeys, "\n")
|
||||
|
||||
|
||||
@@ -210,9 +210,13 @@ func RunDhcp(netCfg *NetworkConfig, setHostname, setDNS bool) error {
|
||||
wg.Add(1)
|
||||
go func(iface string, match InterfaceConfig) {
|
||||
if match.DHCP {
|
||||
// retrigger, perhaps we're running this to get the new address
|
||||
runDhcp(netCfg, iface, match.DHCPArgs, setHostname, setDNS)
|
||||
} else {
|
||||
runDhcp(netCfg, iface, dhcpReleaseCmd, false, true)
|
||||
if hasDhcp(iface) {
|
||||
log.Infof("dhcp release %s", iface)
|
||||
runDhcp(netCfg, iface, dhcpReleaseCmd, false, true)
|
||||
}
|
||||
}
|
||||
wg.Done()
|
||||
}(name, match)
|
||||
@@ -222,6 +226,17 @@ func RunDhcp(netCfg *NetworkConfig, setHostname, setDNS bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func hasDhcp(iface string) bool {
|
||||
cmd := exec.Command("dhcpcd", "-U", iface)
|
||||
//cmd.Stderr = os.Stderr
|
||||
out, err := cmd.Output()
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
}
|
||||
log.Debugf("dhcpcd -u %s: %s", iface, out)
|
||||
return len(out) > 0
|
||||
}
|
||||
|
||||
func runDhcp(netCfg *NetworkConfig, iface string, argstr string, setHostname, setDNS bool) {
|
||||
args := []string{}
|
||||
if argstr != "" {
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
#set -e
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
echo BUILD
|
||||
./scripts/build
|
||||
echo TEST
|
||||
./scripts/test
|
||||
echo VALIDATE
|
||||
./scripts/validate
|
||||
echo PREPARE
|
||||
./scripts/prepare
|
||||
echo PACKAGE
|
||||
./scripts/package
|
||||
echo INTEGRATION-TEST
|
||||
./scripts/integration-test
|
||||
|
||||
echo "--- Run"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# help: Run go unit tests
|
||||
set -e
|
||||
#set -e
|
||||
|
||||
cd $(dirname $0)/..
|
||||
|
||||
|
||||
@@ -84,8 +84,10 @@ func (s *QemuSuite) RunQemuInstalled(c *C, additionalArgs ...string) error {
|
||||
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...)
|
||||
//s.qemuCmd.Stdout = os.Stdout
|
||||
s.qemuCmd.Stderr = os.Stderr
|
||||
if os.Getenv("DEBUG") != "" {
|
||||
s.qemuCmd.Stdout = os.Stdout
|
||||
s.qemuCmd.Stderr = os.Stderr
|
||||
}
|
||||
if err := s.qemuCmd.Start(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -57,8 +57,6 @@ func (s *QemuSuite) TestNetworkBootCfg(c *C) {
|
||||
"3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n"+
|
||||
" inet 10.1.0.41/24 scope global eth1\n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
" inet6 fe80::5054:ff:fe12:3457/64 scope link \n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
"4: eth2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000\n"+
|
||||
"5: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000\n"+
|
||||
"6: docker-sys: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default qlen 1000\n"+
|
||||
@@ -108,13 +106,9 @@ func (s *QemuSuite) TestNetworkBootAndCloudCfg(c *C) {
|
||||
// Need a test for that (presumably once we have libmachine based tests)
|
||||
" inet 10.1.0.52/24 scope global eth1\n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
" inet6 fe80::5054:ff:fe12:3457/64 scope link \n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
"4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n"+
|
||||
" inet 10.31.168.85/24 scope global eth2\n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
" inet6 fe80::5054:ff:fe12:3458/64 scope link \n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
// TODO: I think it would be better if this was dhcp: false, but it could go either way
|
||||
"5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n"+
|
||||
" inet XX.XX.XX.XX/24 brd 10.0.2.255 scope global eth3\n"+
|
||||
@@ -168,13 +162,9 @@ func (s *QemuSuite) TestNetworkCfg(c *C) {
|
||||
"3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n"+
|
||||
" inet 10.1.0.41/24 scope global eth1\n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
" inet6 fe80::5054:ff:fe12:3457/64 scope link \n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
"4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n"+
|
||||
" inet 10.31.168.85/24 scope global eth2\n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
" inet6 fe80::5054:ff:fe12:3458/64 scope link \n"+
|
||||
" valid_lft forever preferred_lft forever\n"+
|
||||
// TODO: I think it would be better if this was dhcp: false, but it could go either way
|
||||
"5: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000\n"+
|
||||
" inet XX.XX.XX.XX/24 brd 10.0.2.255 scope global eth3\n"+
|
||||
|
||||
Reference in New Issue
Block a user