Fixes#1018#1020
Add more wait loops to address cases when unit-tests are running
extremely slow under high load on the build machine.
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Use circular buffer instead of (unlimited) `bytes.Buffer` to limit
amount of stderr output captured. If command being run produces too much
output on stderr, this might consume too much RAM.
Use `pkg/cmd` to run command in `udevd` service. This should allow
easier udevd integration.
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Go by default caches unit-tests results via build cache, so if source
code doesn't have any changes, test results are cached on package level.
As our unit-tests are not that pure and depend on the environment, it
would be more helpful to make sure all the unit-tests during each build.
Setting number of test runs to one disable test result cache (but build
cache is still being used).
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
Since the command's name is 'generate' the 'gen' prefix is not needed
in the version flag. The flag is scoped under the generate command so
it should be very clear that the '--version' flag is used to control the
config version.
We also move to defaulting to v0 since v1 is new and still needs to be
tested in the real world. We can default to v1 in the next release.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This step is based on `golang` image, so `GOCACHE` is set in a bit of a
different way.
No big deal, but should speed up subsequent runs a bit.
Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
If multiple interfaces exist on a node, but the first interface was unsuccessful
in getting a dhcp response, we would seg fault when trying to retrieve the hostname
for that interface. This was due to d.Ack being nil and us having no guard around it
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
- Use az/gcloud cli bundled with container
- Use consistent spacing in scripts ( 2 spaces vs tab )
- Updated count functions to handle the count inline
- Made platform kubeconfig the default
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
Since the cluster create command and the upgrade command shared a common
variable, and the upgrade defaults to an empty string, we get an invalid
reference format error when attempting to create a cluster. This makes
the variables unique to avoid that.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
We have this flag missing in a number of places. This ensures that all
commands in the future will have this flags. A potential cleanup would
be to hide this flag in commands where it does not make sense. For now I
think its best to have everywhere.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
We have no need for this anymore since installs and upgrades are now
completely handled in a container.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This PR will upgrade to the latest beta of v1.16 in order to get us
closer to catching the v1.16.0 release as soon as it drops.
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
We've seen some instances where the initial delay is not long enough (containerd)
as well as a period of every second increases the log size for services like
proxyd which log incoming connections.
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This PR will implement the v1 machine config proposal. This will allow
for a streamlined config for talos nodes.
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
We need to support eventing with associated data. This moves the event
bus to an observer design pattern that allows observers to register for
specific events, and to receive the associated data.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This PR will move to using the external kubeadm v1beta2 structs for our
code base. This will hopefully allow for more stable integrations with
kubeadm in the long term, as well as solve some needs we have in the
machine config rewrite.
Signed-off-by: Spencer Smith <robertspencersmith@gmail.com>
This adds an interface that can be used to descibe boot, shutdown, and
upgrade events in a set of phases.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This adds a well defined task for handling all overlay mount points that
are required by the system.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This moves to using BLKPG ioctl instead of BLKRRPART. BLKRRPART is older
and more sensitive to EBUSY errors. BLKPG has the potential to minimize
the changes of encountering an EBUSY error when manipulating partition
tables.
In looking at a comparison between BLKPG and BLKRRPART, it seems that
both have their pros and cons. Eventually a combination of the two may
serve us better, but for now I think BLKPG will get us further.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
Adds handler for specification of additional subjet alt names (SANs) for
the API Server when generating a new cluster configuration using
`osctl`.
Fixes#800
Signed-off-by: Seán C McCord <ulexus@gmail.com>
This is a major rewrite of our network subsystem.
- This changes networkd to run as a standalone app versus internal goroutine
- This changes out the netlink package with the more idiomatic netlink/rtnetlink
packages
- This changes the initial network bootstrap/discovery from using a single
interface to attempting to bring up all interfaces
- This moves us back on to the upstream dhcp library
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
In order to DRY up all installation methods and mount methods, this PR
introduces a few more runtime modes. The modes are then used to
determine the strategy for creating and or mounting the paritions.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
In order to facilitate upgrades and resets that are capable of
manipulating the system block device, we need to run an instance of
containerd that has zero dependencies on the disk. We run containerd
purely in memory for running system services.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
These are failing with false positives. Disable for now so that we can
run our conformance tests.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
Should prevent flakes when we merge fixes on release branches where they unintentionally
get tagged as `latest`.
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This should fix a race conditions where two independent image creation steps
run `losetup -f` and discover the same 'next available' loopback device and
attempt to use it.
Signed-off-by: Brad Beam <brad.beam@talos-systems.com>
This adds a command runner function that can be used everywhere we need
to exec a binary. It adds addtional logic around error handling that
will allow for viewing errors in the case of a failed command.
Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>