Giter VIP home page Giter VIP logo

bootloose's People

Contributors

bboreham avatar carlosedp avatar chanwit avatar dependabot[bot] avatar dimitropoulos avatar dlespiau avatar hbokh avatar ilmanzo avatar jerryfireman avatar kke avatar kongslund avatar larsfronius avatar lilic avatar luxas avatar marccarre avatar mflendrich avatar morancj avatar najeal avatar ncopa avatar robertojrojas avatar rothgar avatar sayboras avatar skarlso avatar till avatar timorunge avatar twelho avatar twz123 avatar u5surf avatar weave-e2e-quickstart avatar zdyxry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bootloose's Issues

`portMappings.hostPort` does not reset on multiple machine specs

According to specification and common sense, when bootloose.yaml defines several machine sets (e.g. workers and controllers), you'd expect portMappings.hostPort to be the base for port numbers only in a given machine set, not globally. However, the counter continues through all machine replicas in all specifications that include hostPort - contrary to name field, which expands %d as replica counter in given set.

Bootloose version: v0.8.0


Example bootloose.yaml:

cluster:
  name: foo
  privateKey: cluster-key
machines:
  - count: 3
    spec:
      image: quay.io/k0sproject/bootloose-ubuntu22.04
      name: a%d
      portMappings:
        - containerPort: 22
          hostPort: 13000
  - count: 3
    spec:
      image: quay.io/k0sproject/bootloose-ubuntu22.04
      name: b%d
      portMappings:
        - containerPort: 22
          hostPort: 14000
  - count: 3
    spec:
      image: quay.io/k0sproject/bootloose-ubuntu22.04
      name: c%d
      portMappings:
        - containerPort: 22
          hostPort: 15000

Expected mapping for port 22 in each container created:

  • a0 - 13000, a1 - 13001, a2 - 13002
  • b0 - 14000, b1 - 14001, b2 - 14002
  • c0 - 15000, c1 - 15001, c2 - 15002

Actual behaviour - bootloose show:

NAME     HOSTNAME   PORTS           IP            IMAGE                                      CMD          STATE
foo-a0   a0         0->{22 13000}   172.17.0.2    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-a1   a1         0->{22 13001}   172.17.0.3    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-a2   a2         0->{22 13002}   172.17.0.4    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-b0   b0         0->{22 14003}   172.17.0.5    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-b1   b1         0->{22 14004}   172.17.0.6    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-b2   b2         0->{22 14005}   172.17.0.7    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-c0   c0         0->{22 15006}   172.17.0.8    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-c1   c1         0->{22 15007}   172.17.0.9    quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running
foo-c2   c2         0->{22 15008}   172.17.0.10   quay.io/k0sproject/bootloose-ubuntu22.04   /sbin/init   Running

Failing e2e: ssh connect timeouts

For some reason the jobs for some of the images fail because some of the tests (but weirdly not all?) fail to ssh to the machines after creation before the 1 minute retry period is over.

Failing images:

  • amazonlinux2
  • ubuntu16.04
  • centos7

This doesn't seem to happen on local machine.

bootloose does not work on alpine with recent docker

bootloose does not work with recent versions of docker:

$ bootloose create
INFO[0000] Docker Image: quay.io/k0sproject/bootloose-ubuntu20.04:latest present locally 
INFO[0000] Creating machine: cluster-node0 ...          
ERRO[0000] Error response from daemon: Container 75847f73ef039b017b0c63f17fa53565842b8e904b44878cc470a2a6137ca3ad is not running  machine=cluster-node0
FATA[0000] exit status 1                                
$ docker ps -a
CONTAINER ID   IMAGE                                             COMMAND        CREATED          STATUS                        PORTS     NAMES
75847f73ef03   quay.io/k0sproject/bootloose-ubuntu20.04:latest   "/sbin/init"   29 seconds ago   Exited (255) 28 seconds ago             cluster-node0
$ docker logs cluster-node0
systemd 245.4-4ubuntu3.22 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
Detected virtualization docker.
Detected architecture x86-64.

Welcome to Ubuntu 20.04.6 LTS!

Set hostname to <node0>.
Initializing machine ID from random generator.
Failed to create /docker/75847f73ef039b017b0c63f17fa53565842b8e904b44878cc470a2a6137ca3ad/init.scope control group: Operation not supported
Failed to allocate manager object: Operation not supported
[!!!!!!] Failed to allocate manager object.
Exiting PID 1...
$ docker info
Client:
 Version:    24.0.6
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.23.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 61
 Server Version: 24.0.6
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8c087663b0233f6e6e2f4515cee61d49f14746a8
 runc version: 82f18fe0e44a59034f3e1f45e475fa5636e539aa
 init version: 
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.59-0-lts
 Operating System: Alpine Linux edge
 OSType: linux
 Architecture: x86_64
 CPUs: 32
 Total Memory: 62.57GiB
 Name: ncopa-desktop
 ID: TRYL:ABKY:GB6L:LJCL:SXY2:RBLX:BHV7:46AC:MBP7:7CE3:HPUX:WMEN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 

investigate how to use LXD images

LXD maintains a lot of OS OCI images. It would be nice to be able to pull OS images from LXD. Needs investigation on how we can do this.

client_test.go assumes a hardcoded image exists

The test creates real machines that pull quay.io/k0sproject/bootloose-ubuntu20.04, which causes a kind of a chicken and egg situation.

Other things to consider:

  • The unit tests should be runnable as a separate workflow only once, now they are run for every image separately
  • The "cli behavior" related e2e tests should be moved to the unit tests or a new suite
  • The e2e suite should be just for testing images

After that:

  • CLI changes would not require running the rather long image tests.
  • Image tests could be run only for changed images

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.