Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

etcd: enable v2 support for various tests #216

Merged
merged 5 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions kola/tests/etcd/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,15 @@ etcd:
listen_peer_urls: http://0.0.0.0:2380
initial_advertise_peer_urls: http://{PRIVATE_IPV4}:2380
discovery: $discovery
`),
systemd:
units:
- name: etcd-member.service
enabled: true
dropins:
- name: 10-enable-v2.conf
contents: |
[Service]
Environment=ETCD_ENABLE_V2=true`),
ExcludePlatforms: []string{"esx", "qemu-unpriv"}, // etcd-member requires ct rendering and networking
Distros: []string{"cl"},
})
Expand Down Expand Up @@ -113,7 +121,7 @@ func etcdMemberV2BackupRestore(c cluster.TestCluster) {
backup_to="$(mktemp -d)"
sudo etcdctl backup --data-dir=/var/lib/etcd \
sudo --preserve-env=ETCDCTL_API etcdctl backup --data-dir=/var/lib/etcd \
--backup-dir "${backup_to}"
etcdctl rm /$prefix/test
Expand Down
12 changes: 11 additions & 1 deletion kola/tests/flannel/flannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ systemd:
- name: 50-network-config.conf
contents: |
[Service]
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"10.254.0.0/16\", \"Backend\": {\"Type\": \"$type\"} }'`)
# to be changed when flannel will support etcd/V3
Environment=ETCDCTL_API=2
ExecStartPre=/usr/bin/etcdctl set /coreos.com/network/config '{ \"Network\": \"10.254.0.0/16\", \"Backend\": {\"Type\": \"$type\"} }'
- name: etcd-member.service
enabled: true
dropins:
- name: 10-enable-v2.conf
contents: |
[Service]
Environment=ETCD_ENABLE_V2=true`)
)

func init() {
Expand All @@ -65,6 +74,7 @@ func init() {
Distros: []string{"cl"},
ExcludePlatforms: []string{"qemu-unpriv"},
UserData: flannelConf.Subst("$type", "udp"),
Architectures: []string{"amd64"},
})

register.Register(&register.Test{
Expand Down
13 changes: 11 additions & 2 deletions kola/tests/locksmith/locksmith.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,16 @@ etcd:
advertise_client_urls: http://{PRIVATE_IPV4}:2379
initial_advertise_peer_urls: http://{PRIVATE_IPV4}:2380
listen_peer_urls: http://{PRIVATE_IPV4}:2380
discovery: $discovery`),
discovery: $discovery
systemd:
units:
- name: etcd-member.service
enabled: true
dropins:
- name: 10-enable-v2.conf
contents: |
[Service]
Environment=ETCD_ENABLE_V2=true`),
Distros: []string{"cl"},
ExcludePlatforms: []string{"qemu-unpriv"},
})
Expand All @@ -70,7 +79,7 @@ etcd:
"name": "etcd-member.service",
"dropins": [{
"name": "environment.conf",
"contents": "[Unit]\nAfter=certgen.service\nRequires=certgen.service\n[Service]\nEnvironment=ETCD_ADVERTISE_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_LISTEN_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_CERT_FILE=/etc/ssl/certs/etcd-cert.pem\nEnvironment=ETCD_KEY_FILE=/etc/ssl/certs/etcd-key.pem\nEnvironment=ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/ca-locksmith-cert.pem\nEnvironment=ETCD_CLIENT_CERT_AUTH=true"
"contents": "[Unit]\nAfter=certgen.service\nRequires=certgen.service\n[Service]\nEnvironment=ETCD_ADVERTISE_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_LISTEN_CLIENT_URLS=https://127.0.0.1:2379\nEnvironment=ETCD_CERT_FILE=/etc/ssl/certs/etcd-cert.pem\nEnvironment=ETCD_KEY_FILE=/etc/ssl/certs/etcd-key.pem\nEnvironment=ETCD_TRUSTED_CA_FILE=/etc/ssl/certs/ca-locksmith-cert.pem\nEnvironment=ETCD_CLIENT_CERT_AUTH=true\nEnvironment=ETCD_ENABLE_V2=true"
}]
},
{
Expand Down