재부팅 후 cloud-init 서비스가 시작되지 않음

재부팅 후 cloud-init 서비스가 시작되지 않음

재부팅 후 cloud-init 서비스가 시작되지 않습니다. 저는 Suse 15를 사용하고 있으며 내 인스턴스가 OpenStack 클라우드에서 실행되고 있습니다.

OS 세부정보:

NAME="SLES"  
VERSION="15"  
VERSION_ID="15"  
PRETTY_NAME="SUSE Linux Enterprise Server 15"  
ID="sles"  
ID_LIKE="suse"  
ANSI_COLOR="0;32"  
CPE_NAME="cpe:/o:suse:sles:15"  

클라우드 초기화 버전:

cloud-init 19.1

모든 서비스를 활성화했지만 여전히 동일한 문제가 있습니다.

"/etc/systemd/system/cloud-init.target.wants"에 생성된 모든 소프트 링크

lrwxrwxrwx 1 root root 44 Jun 24 07:16 cloud-config.service ->
 /usr/lib/systemd/system/cloud-config.service  
lrwxrwxrwx 1 root root 43 Jun 24 07:16 cloud-final.service -> /usr/lib/systemd/system/cloud-final.service  
lrwxrwxrwx 1 root root 48 Jun 24 07:21 cloud-init-local.service -> /usr/lib/systemd/system/cloud-init-local.service  
lrwxrwxrwx 1 root root 42 Jun 25 05:04 cloud-init.service -> /usr/lib/systemd/system/cloud-init.service  

답변1

이런 일이 일어나는 이유는 cloud-init이 불가능하기 때문입니다.한정된플랫폼. 이 문제를 해결하려면 datasource_list가 필요합니다.

cat <<EOF >>/etc/cloud/cloud.cfg.d/01_ds-identify.cfg
datasource_list: [ OpenStack, None ]
EOF

답변2

다음과 같이 cloud-init 구성에서 datasource_list를 정의해야 할 뿐만 아니라재부팅 후 cloud-init 서비스가 시작되지 않음, 하지만 YAML 목록이 한 줄로 형식화되었는지 확인해야 합니다. cloud-init YAML 파서는 유효한 여러 줄 YAML 목록을 읽을 수 없습니다.

또한보십시오https://github.com/canonical/cloud-init/blob/b5aecbe9512fa546255cc93b178b4081342fc247/tools/ds-identify#L547-L566

관련 정보