Comments (5)
Hi @jiaqiluo
Can you take a look at this issue as it seems related to 2e767c8
from rke.
This bug prevents us from upgrading as kube-apiserver has environment variables set (like the RKE_AUDITLOG_CONFIG_CHECKSUM
variable).
from rke.
hi @tmsdce, thank you for reporting the issue. I can confirm that this is a bug.
Root Cause
This bug occurs in RKE v1.5.9.
If extra_env is set for kube-api as below in the cluster config file, the Env
list in the container configuration for the kube-apiserver
container will contain an empty string (""), which causes the creation to fail with the error invalid environment variable:
returned from Docker.
services:
kube-api:
extra_env:
- TEST_VAR=test
Workaround
If your cluster is stuck in the failed status, remove the extra_env for kube-api from the cluster config and run rke up
again can bring the cluster back to active.
If you need to set the extra_env for kube-api, please use RKE v1.5.8 for now until the bug is fixed in the coming release.
from rke.
the fix can be validated by using https://github.com/rancher/rke/releases/tag/v1.6.0-rc6
Root cause
Previously, we declared the Env slice with the size of the c.Services.KubeAPI.ExtraEnv
field, which leads to empty strings at the beginning of the Env slice because we use Golang's append function to add new elements, and Docker is not happy with that.
What was fixed, or what changes have occurred
We fix this issue by declaring the Env variable as an empty slice.
We also enhance the getUniqStringList
function to properly trim leading and trailing spaces in each element and to ignore empty strings.
We add unit tests for the getUniqStringList
function and update the integration tests.
Areas or cases that should be tested
cluster provisioning and upgrading
What areas could experience regressions?
cluster provisioning and upgrading
Are the repro steps accurate/minimal?
yes
We should validate that setting extra env does not cause the reported error when either creating a new cluster or updating an existing cluster.
services:
kube-api:
extra_env:
- TEST_VAR=test
from rke.
tested the following on v1.6.0-rc9:
- provision an rke1 cluster with no extra_env -- pass
- provision an rke1 cluster with extra_env -- pass
- upgrade an rke1 cluster with no extra_env -> with extra_env -- pass
- upgrade an rke1 cluster with extra_env -> update extra_env -- pass
- upgrade an rke1 cluster with extra_env -> remove extra_env -- pass
tested with default versions of k8s (1.30.2)
from rke.
Related Issues (20)
- with latest kernel version the worker node DNS is not working HOT 2
- RKE restarting masters/workers after adding a new worker or master
- [Question] About ciphers
- Calico versions and other CNI version info? Where? HOT 8
- Metrics: unreachable kubernetes API (no logs) HOT 1
- How to restart apiserver
- Cluster unrecoverable after every power outage - nodes all say ready (even when off) HOT 2
- RKE should have a dry-run option HOT 3
- Errors while removing an etcd member can cause RKE to try to remove the member indefinitely HOT 2
- don't use dns search of the host HOT 1
- FATA[0000] Unsupported Docker version found [26.1.1] on host HOT 4
- Rke with docker rootless HOT 1
- Clarification on using hostNetwork: true in nginx ingress HOT 1
- miss makezero in slice init HOT 1
- [Backport] Provisionning fails with RKE 1.5.9 when extra_env is used for kube-api service HOT 3
- RKE1: Ingress Controller and Ingress not working
- masters not available via SSH - how to moved them into new hosts? HOT 1
- Failed to reconcile etcd plane: Failed to add etcd member [etcd-server-k8s-2] to etcd cluster
- worker node label lost after node reboot [v1.5.10]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rke.