Skip to content

Commit

Permalink
Merge pull request #3149 from chrischdi/pr-ignition-add-and-collect-l…
Browse files Browse the repository at this point in the history
…ogfile

🌱 packaging: write kubeadm script log for ignition
  • Loading branch information
k8s-ci-robot authored Aug 12, 2024
2 parents ae5a234 + 43ffbe8 commit a6fd3f0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packaging/flavorgen/flavors/generators.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ systemd:
After=containerd.service
[Service]
# Make metadata environment variables available for pre-kubeadm commands.
EnvironmentFile=/run/metadata/*`
EnvironmentFile=/run/metadata/*
# Log to file
StandardOutput=append:/var/log/kubeadm-service.log
StandardError=inherit`
)

func newClusterTopologyCluster(supervisorMode bool) (clusterv1.Cluster, error) {
Expand Down
6 changes: 6 additions & 0 deletions templates/cluster-template-ignition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ spec:
[Service]
# Make metadata environment variables available for pre-kubeadm commands.
EnvironmentFile=/run/metadata/*
# Log to file
StandardOutput=append:/var/log/kubeadm-service.log
StandardError=inherit
initConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
Expand Down Expand Up @@ -361,6 +364,9 @@ spec:
[Service]
# Make metadata environment variables available for pre-kubeadm commands.
EnvironmentFile=/run/metadata/*
# Log to file
StandardOutput=append:/var/log/kubeadm-service.log
StandardError=inherit
joinConfiguration:
nodeRegistration:
criSocket: /var/run/containerd/containerd.sock
Expand Down
2 changes: 2 additions & 0 deletions test/framework/log/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ func (c *MachineLogCollector) CollectMachineLog(ctx context.Context, ctrlClient
"sudo", "cat", "/var/log/cloud-init.log"),
captureLogs("cloud-init-output.log",
"sudo", "cat", "/var/log/cloud-init-output.log"),
captureLogs("kubeadm-service.log",
"sudo", "cat", "/var/log/kubeadm-service.log"),
)
}

Expand Down

0 comments on commit a6fd3f0

Please sign in to comment.