-
Notifications
You must be signed in to change notification settings - Fork 197
/
templates_generated.go
9587 lines (8271 loc) · 389 KB
/
templates_generated.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated for package templates by go-bindata DO NOT EDIT. (@generated)
// sources:
// linux/cloud-init/artifacts/10-bindmount.conf
// linux/cloud-init/artifacts/10-cgroupv2.conf
// linux/cloud-init/artifacts/10-componentconfig.conf
// linux/cloud-init/artifacts/10-containerd.conf
// linux/cloud-init/artifacts/10-httpproxy.conf
// linux/cloud-init/artifacts/10-tlsbootstrap.conf
// linux/cloud-init/artifacts/aks-check-network.service
// linux/cloud-init/artifacts/aks-check-network.sh
// linux/cloud-init/artifacts/aks-log-collector-send.py
// linux/cloud-init/artifacts/aks-log-collector.service
// linux/cloud-init/artifacts/aks-log-collector.sh
// linux/cloud-init/artifacts/aks-log-collector.slice
// linux/cloud-init/artifacts/aks-log-collector.timer
// linux/cloud-init/artifacts/aks-logrotate-override.conf
// linux/cloud-init/artifacts/aks-logrotate.service
// linux/cloud-init/artifacts/aks-logrotate.sh
// linux/cloud-init/artifacts/aks-logrotate.timer
// linux/cloud-init/artifacts/aks-rsyslog
// linux/cloud-init/artifacts/apt-preferences
// linux/cloud-init/artifacts/bind-mount.service
// linux/cloud-init/artifacts/bind-mount.sh
// linux/cloud-init/artifacts/block_wireserver.sh
// linux/cloud-init/artifacts/cgroup-memory-telemetry.service
// linux/cloud-init/artifacts/cgroup-memory-telemetry.sh
// linux/cloud-init/artifacts/cgroup-memory-telemetry.timer
// linux/cloud-init/artifacts/cgroup-pressure-telemetry.service
// linux/cloud-init/artifacts/cgroup-pressure-telemetry.sh
// linux/cloud-init/artifacts/cgroup-pressure-telemetry.timer
// linux/cloud-init/artifacts/ci-syslog-watcher.path
// linux/cloud-init/artifacts/ci-syslog-watcher.service
// linux/cloud-init/artifacts/ci-syslog-watcher.sh
// linux/cloud-init/artifacts/cis.sh
// linux/cloud-init/artifacts/containerd.service
// linux/cloud-init/artifacts/containerd_exec_start.conf
// linux/cloud-init/artifacts/crictl.yaml
// linux/cloud-init/artifacts/cse_cmd.sh
// linux/cloud-init/artifacts/cse_config.sh
// linux/cloud-init/artifacts/cse_helpers.sh
// linux/cloud-init/artifacts/cse_install.sh
// linux/cloud-init/artifacts/cse_main.sh
// linux/cloud-init/artifacts/cse_redact_cloud_config.py
// linux/cloud-init/artifacts/cse_send_logs.py
// linux/cloud-init/artifacts/cse_start.sh
// linux/cloud-init/artifacts/dhcpv6.service
// linux/cloud-init/artifacts/disk_queue.service
// linux/cloud-init/artifacts/docker_clear_mount_propagation_flags.conf
// linux/cloud-init/artifacts/enable-dhcpv6.sh
// linux/cloud-init/artifacts/ensure-no-dup.service
// linux/cloud-init/artifacts/ensure-no-dup.sh
// linux/cloud-init/artifacts/etc-issue
// linux/cloud-init/artifacts/etc-issue.net
// linux/cloud-init/artifacts/init-aks-custom-cloud-mariner.sh
// linux/cloud-init/artifacts/init-aks-custom-cloud.sh
// linux/cloud-init/artifacts/ipv6_nftables
// linux/cloud-init/artifacts/ipv6_nftables.service
// linux/cloud-init/artifacts/ipv6_nftables.sh
// linux/cloud-init/artifacts/kms.service
// linux/cloud-init/artifacts/kubelet.service
// linux/cloud-init/artifacts/manifest.json
// linux/cloud-init/artifacts/mariner/cse_helpers_mariner.sh
// linux/cloud-init/artifacts/mariner/cse_install_mariner.sh
// linux/cloud-init/artifacts/mariner/mariner-package-update.sh
// linux/cloud-init/artifacts/mariner/package-update.service
// linux/cloud-init/artifacts/mariner/package-update.timer
// linux/cloud-init/artifacts/mariner/pam-d-system-auth
// linux/cloud-init/artifacts/mariner/pam-d-system-password
// linux/cloud-init/artifacts/mariner/update_certs_mariner.service
// linux/cloud-init/artifacts/mig-partition.service
// linux/cloud-init/artifacts/mig-partition.sh
// linux/cloud-init/artifacts/modprobe-CIS.conf
// linux/cloud-init/artifacts/nvidia-device-plugin.service
// linux/cloud-init/artifacts/nvidia-docker-daemon.json
// linux/cloud-init/artifacts/nvidia-modprobe.service
// linux/cloud-init/artifacts/pam-d-common-auth
// linux/cloud-init/artifacts/pam-d-common-auth-2204
// linux/cloud-init/artifacts/pam-d-common-password
// linux/cloud-init/artifacts/pam-d-su
// linux/cloud-init/artifacts/profile-d-cis.sh
// linux/cloud-init/artifacts/pwquality-CIS.conf
// linux/cloud-init/artifacts/reconcile-private-hosts.service
// linux/cloud-init/artifacts/reconcile-private-hosts.sh
// linux/cloud-init/artifacts/rsyslog-d-60-CIS.conf
// linux/cloud-init/artifacts/setup-custom-search-domains.sh
// linux/cloud-init/artifacts/sshd_config
// linux/cloud-init/artifacts/sshd_config_1604
// linux/cloud-init/artifacts/sshd_config_1804_fips
// linux/cloud-init/artifacts/sync-container-logs.service
// linux/cloud-init/artifacts/sync-container-logs.sh
// linux/cloud-init/artifacts/sysctl-d-60-CIS.conf
// linux/cloud-init/artifacts/teleportd.service
// linux/cloud-init/artifacts/ubuntu/cse_helpers_ubuntu.sh
// linux/cloud-init/artifacts/ubuntu/cse_install_ubuntu.sh
// linux/cloud-init/artifacts/ubuntu/snapshot-update.service
// linux/cloud-init/artifacts/ubuntu/snapshot-update.timer
// linux/cloud-init/artifacts/ubuntu/ubuntu-snapshot-update.sh
// linux/cloud-init/artifacts/update_certs.path
// linux/cloud-init/artifacts/update_certs.service
// linux/cloud-init/artifacts/update_certs.sh
// linux/cloud-init/nodecustomdata.yml
// windows/csecmd.ps1
// windows/kuberneteswindowssetup.ps1
// windows/sendlogs.ps1
// windows/windowscsehelper.ps1
package templates
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strings"
"time"
)
type asset struct {
bytes []byte
info os.FileInfo
}
type bindataFileInfo struct {
name string
size int64
mode os.FileMode
modTime time.Time
}
// Name return file name
func (fi bindataFileInfo) Name() string {
return fi.name
}
// Size return file size
func (fi bindataFileInfo) Size() int64 {
return fi.size
}
// Mode return file mode
func (fi bindataFileInfo) Mode() os.FileMode {
return fi.mode
}
// Mode return file modify time
func (fi bindataFileInfo) ModTime() time.Time {
return fi.modTime
}
// IsDir return file whether a directory
func (fi bindataFileInfo) IsDir() bool {
return fi.mode&os.ModeDir != 0
}
// Sys return file is sys mode
func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _linuxCloudInitArtifacts10BindmountConf = []byte(`[Unit]
Requires=bind-mount.service
After=bind-mount.service
`)
func linuxCloudInitArtifacts10BindmountConfBytes() ([]byte, error) {
return _linuxCloudInitArtifacts10BindmountConf, nil
}
func linuxCloudInitArtifacts10BindmountConf() (*asset, error) {
bytes, err := linuxCloudInitArtifacts10BindmountConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/10-bindmount.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifacts10Cgroupv2Conf = []byte(`[Service]
Environment="KUBELET_CGROUP_FLAGS=--cgroup-driver=systemd"
`)
func linuxCloudInitArtifacts10Cgroupv2ConfBytes() ([]byte, error) {
return _linuxCloudInitArtifacts10Cgroupv2Conf, nil
}
func linuxCloudInitArtifacts10Cgroupv2Conf() (*asset, error) {
bytes, err := linuxCloudInitArtifacts10Cgroupv2ConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/10-cgroupv2.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifacts10ComponentconfigConf = []byte(`[Service]
Environment="KUBELET_CONFIG_FILE_FLAGS=--config /etc/default/kubeletconfig.json"
`)
func linuxCloudInitArtifacts10ComponentconfigConfBytes() ([]byte, error) {
return _linuxCloudInitArtifacts10ComponentconfigConf, nil
}
func linuxCloudInitArtifacts10ComponentconfigConf() (*asset, error) {
bytes, err := linuxCloudInitArtifacts10ComponentconfigConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/10-componentconfig.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifacts10ContainerdConf = []byte(`[Service]
Environment="KUBELET_CONTAINERD_FLAGS=--container-runtime=remote --runtime-request-timeout=15m --container-runtime-endpoint=unix:///run/containerd/containerd.sock --runtime-cgroups=/system.slice/containerd.service"
`)
func linuxCloudInitArtifacts10ContainerdConfBytes() ([]byte, error) {
return _linuxCloudInitArtifacts10ContainerdConf, nil
}
func linuxCloudInitArtifacts10ContainerdConf() (*asset, error) {
bytes, err := linuxCloudInitArtifacts10ContainerdConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/10-containerd.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifacts10HttpproxyConf = []byte(`[Service]
EnvironmentFile=/etc/environment
`)
func linuxCloudInitArtifacts10HttpproxyConfBytes() ([]byte, error) {
return _linuxCloudInitArtifacts10HttpproxyConf, nil
}
func linuxCloudInitArtifacts10HttpproxyConf() (*asset, error) {
bytes, err := linuxCloudInitArtifacts10HttpproxyConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/10-httpproxy.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifacts10TlsbootstrapConf = []byte(`[Service]
Environment="KUBELET_TLS_BOOTSTRAP_FLAGS=--kubeconfig /var/lib/kubelet/kubeconfig --bootstrap-kubeconfig /var/lib/kubelet/bootstrap-kubeconfig"
`)
func linuxCloudInitArtifacts10TlsbootstrapConfBytes() ([]byte, error) {
return _linuxCloudInitArtifacts10TlsbootstrapConf, nil
}
func linuxCloudInitArtifacts10TlsbootstrapConf() (*asset, error) {
bytes, err := linuxCloudInitArtifacts10TlsbootstrapConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/10-tlsbootstrap.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksCheckNetworkService = []byte(`[Unit]
Description=AKS Check Network
After=network-online.target
[Service]
Type=oneshot
ExecStart=/opt/azure/containers/aks-check-network.sh
`)
func linuxCloudInitArtifactsAksCheckNetworkServiceBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksCheckNetworkService, nil
}
func linuxCloudInitArtifactsAksCheckNetworkService() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksCheckNetworkServiceBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-check-network.service", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksCheckNetworkSh = []byte(`#! /bin/bash
#
# AKS Check Network
#
# This script is used to check network connectivity from the node to certain required AKS endpoints
# and log the results to the events directory. For now, this script has to be triggered manually to
# collect the log. In the future, we will run it periodically to check and alert any issue.
APISERVER_FQDN=${1:-''}
CUSTOM_ENDPOINT=${2:-''}
EVENTS_LOGGING_PATH="/var/log/azure/Microsoft.Azure.Extensions.CustomScript/events/"
AZURE_CONFIG_PATH="/etc/kubernetes/azure.json"
AKS_CA_CERT_PATH="/etc/kubernetes/certs/apiserver.crt"
AKS_CERT_PATH="/etc/kubernetes/certs/client.crt"
AKS_KEY_PATH="/etc/kubernetes/certs/client.key"
RESOLV_CONFIG_PATH="/etc/resolv.conf"
SYSTEMD_RESOLV_CONFIG_PATH="/run/systemd/resolve/resolv.conf"
ARM_ENDPOINT="management.azure.com"
METADATA_ENDPOINT="http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https://${ARM_ENDPOINT}/"
AKS_ENDPOINT="https://${ARM_ENDPOINT}/providers/Microsoft.ContainerService/operations?api-version=2023-11-01"
APISERVER_ENDPOINT="https://${APISERVER_FQDN}/healthz"
TEMP_DIR=$(mktemp -d)
NSLOOKUP_FILE="${TEMP_DIR}/nslookup.log"
TOKEN_FILE="${TEMP_DIR}/access_token.json"
MAX_RETRY=3
MAX_TIME=10
DELAY=5
declare -A URL_LIST=(
["mcr.microsoft.com"]="This is required to access images in Microsoft Container Registry (MCR). These images are required for the correct creation and functioning of the cluster, including scale and upgrade operations."\
["eastus.data.mcr.microsoft.com"]="FQDN *.data.mcr.microsoft.com is required for MCR storage backed by the Azure content delivery network (CDN)."\
["login.microsoftonline.com"]="This is equired for Microsoft Entra authentication."\
["packages.microsoft.com"]="This is required to download packages (like Moby, PowerShell, and Azure CLI) using cached apt-get operations."\
["acs-mirror.azureedge.net"]="This is required to download and install required binaries like kubenet and Azure CNI."\
)
function logs_to_events {
# local vars here allow for nested function tracking
# installContainerRuntime for example
local task=$1; shift
local eventsFileName=$(date +%s%3N)
local startTime=$(date +"%F %T.%3N")
${@}
ret=$?
local endTime=$(date +"%F %T.%3N")
# arg names are defined by GA and all these are required to be correctly read by GA
# EventPid, EventTid are required to be int. No use case for them at this point.
json_string=$( jq -n \
--arg Timestamp "${startTime}" \
--arg OperationId "${endTime}" \
--arg Version "1.23" \
--arg TaskName "${task}" \
--arg EventLevel "Informational" \
--arg Message "Completed: ${@}" \
--arg EventPid "0" \
--arg EventTid "0" \
'{Timestamp: $Timestamp, OperationId: $OperationId, Version: $Version, TaskName: $TaskName, EventLevel: $EventLevel, Message: $Message, EventPid: $EventPid, EventTid: $EventTid}'
)
echo ${json_string} > ${EVENTS_LOGGING_PATH}${eventsFileName}.json
# this allows an error from the command at ${@} to be returned and correct code assigned in cse_main
if [ "$ret" != "0" ]; then
return $ret
fi
}
function dns_trace {
local endpoint=$1
echo "Trace DNS request for $endpoint"
dig $endpoint
host -a $endpoint
}
function check_and_curl {
local url=$1
local error_msg=$2
# check DNS
nslookup $url > /dev/null
if [ $? -eq 0 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested DNS resolution to $url'"
else
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to test DNS resolution to $url. $error_msg'"
dns_trace $url
return 1
fi
local i=0
while true;
do
# curl the url and capture the response code
response=$(curl -s -m $MAX_TIME -o /dev/null -w "%{http_code}" "https://${url}" -L)
if [ $response -ge 200 ] && [ $response -lt 400 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested $url with returned status code $response'"
break
elif [ $response -eq 400 ] && ([ $url == "acs-mirror.azureedge.net" ] || [ $url == "eastus.data.mcr.microsoft.com" ]); then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested $url with returned status code $response. This is expected since $url is a repository endpoint which requires a full package path to get 200 status code.'"
break
else
# if the response code is not within successful range, increment the error count
i=$(( $i + 1 ))
# if we have reached the maximum number of retries, log an error
if [[ $i -eq $MAX_RETRY ]]; then
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to curl $url after $MAX_RETRY attempts with returned status code $response. $error_msg'"
break
fi
# sleep for the specified delay before trying again
sleep $DELAY
fi
done
}
if ! [ -e "${AZURE_CONFIG_PATH}" ]; then
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - WARNING: Failed to find $AZURE_CONFIG_PATH file. Are you running inside Kubernetes?'"
fi
# check DNS resolution to ARM endpoint
nslookup $ARM_ENDPOINT > $NSLOOKUP_FILE
if [ $? -eq 0 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested DNS resolution to $ARM_ENDPOINT'"
else
error_log=$(cat $NSLOOKUP_FILE)
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to test DNS resolution to $ARM_ENDPOINT with error $error_log'"
# check resolv.conf
nameserver=$(cat $NSLOOKUP_FILE | grep "Server" | awk '{print $2}')
echo "Checking resolv.conf for nameserver $nameserver"
cat $RESOLV_CONFIG_PATH | grep $nameserver
if [ $? -ne 0 ]; then
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - FAILURE: Nameserver $nameserver wasn't found in $RESOLV_CONFIG_PATH'"
fi
cat $SYSTEMD_RESOLV_CONFIG_PATH | grep $nameserver
if [ $? -ne 0 ]; then
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - FAILURE: Nameserver $nameserver wasn't found in $SYSTEMD_RESOLV_CONFIG_PATH'"
fi
# trace request
dns_trace $ARM_ENDPOINT
exit 1
fi
# check access to ARM endpoint
result=$(curl -m $MAX_TIME -s -o $TOKEN_FILE -w "%{http_code}" -H Metadata:true $METADATA_ENDPOINT)
if [ $result -eq 200 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully retrieved access token'"
access_token=$(cat $TOKEN_FILE | jq -r .access_token)
res=$(curl -m $MAX_TIME -X GET -H "Authorization: Bearer $access_token" -H "Content-Type:application/json" -s -o /dev/null -w "%{http_code}" $AKS_ENDPOINT)
if [ $res -ge 200 ] && [ $res -lt 400 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested $ARM_ENDPOINT with returned status code $res'"
else
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to test $ARM_ENDPOINT with returned status code $res. This endpoint is required for Kubernetes operations against the Azure API'"
fi
else
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to retrieve access token with returned status code $result. Can't check access to $ARM_ENDPOINT'"
fi
# check access to apiserver
if [ -z "$APISERVER_FQDN" ]; then
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - WARNING: No apiserver FQDN provided. Skipping apiserver check.'"
else
nslookup $APISERVER_FQDN > /dev/null
if [ $? -eq 0 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested DNS resolution to $APISERVER_FQDN'"
res=$(curl -m $MAX_TIME -s -o /dev/null -w "%{http_code}" --cacert $AKS_CA_CERT_PATH --cert $AKS_CERT_PATH --key $AKS_KEY_PATH $APISERVER_ENDPOINT)
if [ $res -ge 200 ] && [ $res -lt 400 ]; then
logs_to_events "AKS.CSE.testingTraffic.success" "echo '$(date) - SUCCESS: Successfully tested apiserver $APISERVER_FQDN with returned status code $res'"
else
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to test $APISERVER_FQDN with returned status code $res. Node might not be able to connect to the apiserver'"
fi
else
logs_to_events "AKS.CSE.testingTraffic.failure" "echo '$(date) - ERROR: Failed to test DNS resolution to $APISERVER_FQDN. Node might not be able to connect to the apiserver'"
dns_trace $APISERVER_FQDN
fi
fi
# check access to required endpoints
for url in "${!URL_LIST[@]}"
do
check_and_curl $url "${URL_LIST[$url]}"
done
# check access to additional endpoints
if [ ! -z "$CUSTOM_ENDPOINT" ]; then
echo "Checking additional endpoints ..."
extra_urls=($(echo $CUSTOM_ENDPOINT | tr "," "\n"))
for url in "${extra_urls[@]}"
do
check_and_curl $url ""
done
fi`)
func linuxCloudInitArtifactsAksCheckNetworkShBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksCheckNetworkSh, nil
}
func linuxCloudInitArtifactsAksCheckNetworkSh() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksCheckNetworkShBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-check-network.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogCollectorSendPy = []byte(`#! /usr/bin/env python3
import urllib3
import uuid
import xml.etree.ElementTree as ET
http = urllib3.PoolManager()
# Get the container_id and deployment_id from the Goal State
goal_state_xml = http.request(
'GET',
'http://168.63.129.16/machine/?comp=goalstate',
headers={
'x-ms-version': '2012-11-30'
}
)
goal_state = ET.fromstring(goal_state_xml.data.decode('utf-8'))
container_id = goal_state.findall('./Container/ContainerId')[0].text
role_config_name = goal_state.findall('./Container/RoleInstanceList/RoleInstance/Configuration/ConfigName')[0].text
deployment_id = role_config_name.split('.')[0]
# Upload the logs
with open('/var/lib/waagent/logcollector/logs.zip', 'rb') as logs:
logs_data = logs.read()
upload_logs = http.request(
'PUT',
'http://168.63.129.16:32526/vmAgentLog',
headers={
'x-ms-version': '2015-09-01',
'x-ms-client-correlationid': str(uuid.uuid4()),
'x-ms-client-name': 'AKSCSEPlugin',
'x-ms-client-version': '0.1.0',
'x-ms-containerid': container_id,
'x-ms-vmagentlog-deploymentid': deployment_id,
},
body=logs_data,
)
if upload_logs.status == 200:
print("Successfully uploaded logs")
exit(0)
else:
print('Failed to upload logs')
print(f'Response status: {upload_logs.status}')
print(f'Response body:\n{upload_logs.data.decode("utf-8")}')
exit(1)`)
func linuxCloudInitArtifactsAksLogCollectorSendPyBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogCollectorSendPy, nil
}
func linuxCloudInitArtifactsAksLogCollectorSendPy() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogCollectorSendPyBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-log-collector-send.py", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogCollectorService = []byte(`[Unit]
Description=AKS Log Collector
[Service]
Type=oneshot
Slice=aks-log-collector.slice
ExecStart=/opt/azure/containers/aks-log-collector.sh
RemainAfterExit=no
`)
func linuxCloudInitArtifactsAksLogCollectorServiceBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogCollectorService, nil
}
func linuxCloudInitArtifactsAksLogCollectorService() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogCollectorServiceBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-log-collector.service", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogCollectorSh = []byte(`#! /bin/bash
#
# AKS Log Collector
#
# This script collects information and logs that are useful to AKS engineering
# for support and uploads them to the Azure host via a private API. These log
# bundles are available to engineering when customers open a support case and
# are especially useful for troubleshooting failures of networking or
# kubernetes daemons.
#
# This script runs via a systemd unit and slice that limits it to low CPU
# priority and 128MB RAM, to avoid impacting other system functions.
# Log bundle upload max size is limited to 100MB
MAX_SIZE=104857600
# Shell options - remove non-matching globs, don't care about case, and use
# extended pattern matching
shopt -s nullglob nocaseglob extglob
command -v zip >/dev/null || {
echo "Error: zip utility not found. Please install zip."
exit 255
}
# Create a temporary directory to store results in
WORKDIR="$(mktemp -d)"
# check if tmp dir was created
if [[ ! "$WORKDIR" || "$WORKDIR" == "/" || "$WORKDIR" == "/tmp" || ! -d "$WORKDIR" ]]; then
echo "ERROR: Could not create temporary working directory."
exit 1
fi
cd $WORKDIR
echo "Created temporary directory: $WORKDIR"
# Function to clean up the output directory and log termination
function cleanup {
# Make sure WORKDIR is a proper temp directory so we don't rm something we shouldn't
if [[ $WORKDIR =~ ^/tmp/tmp\.[a-zA-Z0-9]+$ ]]; then
if [[ "$DEBUG" != "1" ]]; then
echo "Cleaning up $WORKDIR..."
rm -rf "$WORKDIR"
else
echo "DEBUG active or $WORKDIR looks wrong; leaving $WORKDIR behind."
fi
else
echo "ERROR: WORKDIR ($WORKDIR) doesn't look like a proper mktemp directory; not removing it for safety reasons!"
exit 255
fi
echo "Log collection finished."
}
# Execute the cleanup function if the script terminates
trap "exit 1" HUP INT PIPE QUIT TERM
trap "cleanup" EXIT
# Collect general system information
echo "Collecting system information..."
mkdir collect collect/proc collect/proc/net
# Include some disk listings
command -v find >/dev/null && find /dev /etc /var/lib/waagent /var/log -ls >collect/file_listings.txt 2>&1
# Collect all installed packages for Ubuntu and Azure Linux
command -v dpkg >/dev/null && dpkg -l >collect/dpkg.txt 2>&1
command -v tdnf >/dev/null && tdnf list installed >collect/tdnf.txt 2>&1
# Collect system information
command -v blkid >/dev/null && blkid >>collect/diskinfo.txt 2>&1
command -v df >/dev/null && {
df -al > collect/du_bytes.txt 2>&1
df -ail >> collect/du_inodes.txt 2>&1
}
command -v lsblk >/dev/null && lsblk >collect/diskinfo.txt 2>&1
command -v lscpu >/dev/null && {
lscpu >collect/lscpu.txt 2>&1
lscpu -J >collect/lscpu.json 2>&1
}
command -v lshw >/dev/null && {
lshw >collect/lshw.txt 2>&1
lshw -json >collect/lshw.json 2>&1
}
command -v lsipc >/dev/null && lsipc >collect/lsipc.txt 2>&1
command -v lsns >/dev/null && lsns -J --output-all >collect/lsns.json 2>&1
command -v lspci >/dev/null && lspci -vkPP >collect/lspci.txt 2>&1
command -v lsscsi >/dev/null && lsscsi -vv >collect/lsscsi.txt 2>&1
command -v lsvmbus >/dev/null && lsvmbus -vv >collect/lsvmbus.txt 2>&1
command -v sysctl >/dev/null && sysctl -a >collect/sysctl.txt 2>&1
command -v systemctl >/dev/null && systemctl status --all -fr >collect/systemctl-status.txt 2>&1
# Collect container runtime information
command -v crictl >/dev/null && {
crictl version >collect/crictl_version.txt 2>&1
crictl info -o json >collect/crictl_info.json 2>&1
crictl images -o json >collect/crictl_images.json 2>&1
crictl imagefsinfo -o json >collect/crictl_imagefsinfo.json 2>&1
crictl pods -o json >collect/crictl_pods.json 2>&1
crictl ps -o json >collect/crictl_ps.json 2>&1
crictl stats -o json >collect/crictl_stats.json 2>&1
crictl statsp -o json >collect/crictl_statsp.json 2>&1
}
# Collect network information
command -v conntrack >/dev/null && {
conntrack -L >collect/conntrack.txt 2>&1
conntrack -S >>collect/conntrack.txt 2>&1
}
command -v ip >/dev/null && {
ip -4 -d -j addr show >collect/ip_4_addr.json 2>&1
ip -4 -d -j neighbor show >collect/ip_4_neighbor.json 2>&1
ip -4 -d -j route show >collect/ip_4_route.json 2>&1
ip -4 -d -j tcpmetrics show >collect/ip_4_tcpmetrics.json 2>&1
ip -6 -d -j addr show table all >collect/ip_6_addr.json 2>&1
ip -6 -d -j neighbor show >collect/ip_6_neighbor.json 2>&1
ip -6 -d -j route show table all >collect/ip_6_route.json 2>&1
ip -6 -d -j tcpmetrics show >collect/ip_6_tcpmetrics.json 2>&1
ip -d -j link show >collect/ip_link.json 2>&1
ip -d -j netconf show >collect/ip_netconf.json 2>&1
ip -d -j netns show >collect/ip_netns.json 2>&1
ip -d -j rule show >collect/ip_rule.json 2>&1
}
command -v iptables >/dev/null && iptables -L -vn --line-numbers >collect/iptables.txt 2>&1
command -v ip6tables >/dev/null && ip6tables -L -vn --line-numbers >collect/ip6tables.txt 2>&1
command -v nft >/dev/null && nft -jn list ruleset >collect/nftables.json 2>&1
command -v ss >/dev/null && {
ss -anoempiO --cgroup >collect/ss.txt 2>&1
ss -s >>collect/ss.txt 2>&1
}
# Collect network information from network namespaces
command -v ip >/dev/null && ip -all netns exec /bin/bash -x -c "
command -v conntrack >/dev/null && {
conntrack -L 2>&1;
conntrack -S 2>&1;
}
command -v ip >/dev/null && {
ip -4 -d -j addr show 2>&1;
ip -4 -d -j neighbor show 2>&1;
ip -4 -d -j route show 2>&1;
ip -4 -d -j tcpmetrics show 2>&1;
ip -6 -d -j addr show table all 2>&1;
ip -6 -d -j neighbor show 2>&1;
ip -6 -d -j route show table all 2>&1;
ip -6 -d -j tcpmetrics show 2>&1;
ip -d -j link show 2>&1;
ip -d -j netconf show 2>&1;
ip -d -j netns show 2>&1;
ip -d -j rule show 2>&1;
}
command -v iptables >/dev/null && iptables -L -vn --line-numbers 2>&1;
command -v ip6tables >/dev/null && ip6tables -L -vn --line-numbers 2>&1;
command -v nft >/dev/null && nft -jn list ruleset 2>&1;
command -v ss >/dev/null && {
ss -anoempiO --cgroup 2>&1;
ss -s 2>&1;
}
" >collect/ip_netns_commands.txt 2>&1
# Collect general information
cp /proc/@(cmdline|cpuinfo|filesystems|interrupts|loadavg|meminfo|modules|mounts|slabinfo|stat|uptime|version*|vmstat) collect/proc/
cp -r /proc/net/* collect/proc/net/
# Include collected information in zip
zip -DZ deflate -r aks_logs.zip collect/*
# File globs to include
# Smaller and more critical files are closer to the top so that we can be certain they're included.
declare -a GLOBS
# AKS specific entries
GLOBS+=(/etc/cni/net.d/*)
GLOBS+=(/etc/containerd/*)
GLOBS+=(/etc/default/kubelet)
GLOBS+=(/etc/kubernetes/manifests/*)
GLOBS+=(/var/log/azure-cni*)
GLOBS+=(/var/log/azure-cns*)
GLOBS+=(/var/log/azure-ipam*)
GLOBS+=(/var/log/azure-vnet*)
GLOBS+=(/var/log/cillium-cni*)
GLOBS+=(/var/run/azure-vnet*)
GLOBS+=(/var/run/azure-cns*)
# based on MANIFEST_FULL from Azure Linux Agent's log collector
# https://github.com/Azure/WALinuxAgent/blob/master/azurelinuxagent/common/logcollector_manifests.py
GLOBS+=(/var/lib/waagent/provisioned)
GLOBS+=(/etc/fstab)
GLOBS+=(/etc/ssh/sshd_config)
GLOBS+=(/boot/grub*/grub.c*)
GLOBS+=(/boot/grub*/menu.lst)
GLOBS+=(/etc/*-release)
GLOBS+=(/etc/HOSTNAME)
GLOBS+=(/etc/hostname)
GLOBS+=(/etc/apt/sources.list)
GLOBS+=(/etc/apt/sources.list.d/*)
GLOBS+=(/etc/network/interfaces)
GLOBS+=(/etc/network/interfaces.d/*.cfg)
GLOBS+=(/etc/netplan/*.yaml)
GLOBS+=(/etc/nsswitch.conf)
GLOBS+=(/etc/resolv.conf)
GLOBS+=(/run/systemd/resolve/stub-resolv.conf)
GLOBS+=(/run/resolvconf/resolv.conf)
GLOBS+=(/etc/sysconfig/iptables)
GLOBS+=(/etc/sysconfig/network)
GLOBS+=(/etc/sysconfig/network/ifcfg-eth*)
GLOBS+=(/etc/sysconfig/network/routes)
GLOBS+=(/etc/sysconfig/network-scripts/ifcfg-eth*)
GLOBS+=(/etc/sysconfig/network-scripts/route-eth*)
GLOBS+=(/etc/ufw/ufw.conf)
GLOBS+=(/etc/waagent.conf)
GLOBS+=(/var/lib/hyperv/.kvp_pool_*)
GLOBS+=(/var/lib/dhcp/dhclient.eth0.leases)
GLOBS+=(/var/lib/dhclient/dhclient-eth0.leases)
GLOBS+=(/var/lib/wicked/lease-eth0-dhcp-ipv4.xml)
GLOBS+=(/var/log/azure/custom-script/handler.log)
GLOBS+=(/var/log/azure/run-command/handler.log)
GLOBS+=(/var/lib/waagent/ovf-env.xml)
GLOBS+=(/var/lib/waagent/*/status/*.status)
GLOBS+=(/var/lib/waagent/*/config/*.settings)
GLOBS+=(/var/lib/waagent/*/config/HandlerState)
GLOBS+=(/var/lib/waagent/*/config/HandlerStatus)
GLOBS+=(/var/lib/waagent/SharedConfig.xml)
GLOBS+=(/var/lib/waagent/ManagedIdentity-*.json)
GLOBS+=(/var/lib/waagent/waagent_status.json)
GLOBS+=(/var/lib/waagent/*/error.json)
GLOBS+=(/var/log/cloud-init*)
GLOBS+=(/var/log/azure/*/*)
GLOBS+=(/var/log/azure/*/*/*)
GLOBS+=(/var/log/syslog*)
GLOBS+=(/var/log/rsyslog*)
GLOBS+=(/var/log/messages*)
GLOBS+=(/var/log/kern*)
GLOBS+=(/var/log/dmesg*)
GLOBS+=(/var/log/dpkg*)
GLOBS+=(/var/log/yum*)
GLOBS+=(/var/log/boot*)
GLOBS+=(/var/log/auth*)
GLOBS+=(/var/log/secure*)
# Add each file sequentially to the zip archive. This is slightly less efficient then adding them
# all at once, but allows us to easily check when we've exceeded the maximum file size and stop
# adding things to the archive.
echo "Adding log files to zip archive..."
for file in ${GLOBS[*]}; do
if test -e $file; then
zip -DZ deflate -u aks_logs.zip $file -x '*.sock'
# The API for the log bundle has a max file size (defined above, usually 100MB), so if
# adding this last file made the zip go over that size, remove that file and stop processing.
FILE_SIZE=$(stat --printf "%s" aks_logs.zip)
if [ $FILE_SIZE -ge $MAX_SIZE ]; then
echo "WARNING: ZIP file size $FILE_SIZE >= $MAX_SIZE; removing last log file and terminating adding more files."
zip -d aks_logs.zip $file
break
fi
fi
done
# Copy the log bundle to the expected path for uploading, then trigger
# the upload script to push it to the host storage location.
echo "Log bundle size: $(du -hs aks_logs.zip)"
mkdir -p /var/lib/waagent/logcollector
cp aks_logs.zip /var/lib/waagent/logcollector/logs.zip
echo -n "Uploading log bundle: "
/usr/bin/env python3 /opt/azure/containers/aks-log-collector-send.py
`)
func linuxCloudInitArtifactsAksLogCollectorShBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogCollectorSh, nil
}
func linuxCloudInitArtifactsAksLogCollectorSh() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogCollectorShBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-log-collector.sh", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogCollectorSlice = []byte(`[Unit]
Description=AKS Log Collector Slice
DefaultDependencies=no
Before=slices.target
Requires=system.slice
After=system.slice
[Slice]
CPUAccounting=true
#CPUQuota=10%
CPUShares=100
CPUWeight=1
MemoryMax=256M
`)
func linuxCloudInitArtifactsAksLogCollectorSliceBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogCollectorSlice, nil
}
func linuxCloudInitArtifactsAksLogCollectorSlice() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogCollectorSliceBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-log-collector.slice", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogCollectorTimer = []byte(`[Unit]
Description=AKS Log Collector Timer
[Timer]
OnActiveSec=0m
OnBootSec=5min
OnUnitActiveSec=60m
[Install]
WantedBy=timers.target
`)
func linuxCloudInitArtifactsAksLogCollectorTimerBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogCollectorTimer, nil
}
func linuxCloudInitArtifactsAksLogCollectorTimer() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogCollectorTimerBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-log-collector.timer", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogrotateOverrideConf = []byte(`[Timer]
OnCalendar=
OnCalendar=*-*-* *:00:00`)
func linuxCloudInitArtifactsAksLogrotateOverrideConfBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogrotateOverrideConf, nil
}
func linuxCloudInitArtifactsAksLogrotateOverrideConf() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogrotateOverrideConfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-logrotate-override.conf", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogrotateService = []byte(`[Unit]
Description=runs the logrotate utility for log rotation with a custom configuration
[Service]
ExecStart=/usr/local/bin/logrotate.sh`)
func linuxCloudInitArtifactsAksLogrotateServiceBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogrotateService, nil
}
func linuxCloudInitArtifactsAksLogrotateService() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogrotateServiceBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{name: "linux/cloud-init/artifacts/aks-logrotate.service", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)}
a := &asset{bytes: bytes, info: info}
return a, nil
}
var _linuxCloudInitArtifactsAksLogrotateSh = []byte(`#!/bin/sh
# This script was originally generated by logrotate automatically and placed in /etc/cron.daily/logrotate
# This will be saved on the target VM within /usr/local/bin/logrotate.sh and invoked by logrotate.service
# Clean non existent log file entries from status file
cd /var/lib/logrotate
test -e status || touch status
head -1 status > status.clean
sed 's/"//g' status | while read logfile date
do
[ -e "$logfile" ] && echo "\"$logfile\" $date"
done >> status.clean
mv status.clean status
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate --verbose /etc/logrotate.conf`)
func linuxCloudInitArtifactsAksLogrotateShBytes() ([]byte, error) {
return _linuxCloudInitArtifactsAksLogrotateSh, nil
}
func linuxCloudInitArtifactsAksLogrotateSh() (*asset, error) {
bytes, err := linuxCloudInitArtifactsAksLogrotateShBytes()