<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>51436</bug_id>
          
          <creation_ts>2024-09-09 14:48:39 +0300</creation_ts>
          <short_desc>cloud-init.service is not ordered after NetworkManager-wait-online.service</short_desc>
          <delta_ts>2024-09-09 15:03:20 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Branch p11</product>
          <component>cloud-init-config-network-manager</component>
          <version>unspecified</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Arseny Maslennikov">arseny</reporter>
          <assigned_to name="obirvalger@altlinux.org">obirvalger</assigned_to>
          <cc>amakeenk</cc>
    
    <cc>shaba</cc>
          
          <qa_contact name="qa-p11@altlinux.org">qa-p11</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>251406</commentid>
    <comment_count>0</comment_count>
    <who name="Arseny Maslennikov">arseny</who>
    <bug_when>2024-09-09 14:48:39 +0300</bug_when>
    <thetext>В версии 24.1.1 в p11 у юнита нет порядковой зависимости на NetworkManager-wait-online, что вместе с cloud-init-config-network-manager на этапе развёртывания ведёт к гонкам и высокой вероятности облома.

В версии 24.1.1 из пакета в p11:
  [root@ ]# systemctl cat cloud-init.service
  [Unit]
  Description=Initial cloud-init job (metadata service crawler)
  ConditionVirtualization=yes
  DefaultDependencies=no
  Wants=cloud-init-local.service
  Wants=sshd.service
  After=cloud-init-local.service
  After=systemd-networkd-wait-online.service
  Before=network-online.target
  Before=sshd.service
  ConditionPathExists=!/etc/cloud/cloud-init.disabled
  ConditionKernelCommandLine=!cloud-init=disabled
  ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
  
  [Service]
  Type=oneshot
  ExecStart=/usr/bin/cloud-init init
  RemainAfterExit=yes
  TimeoutSec=0
  
  # Output needs to appear in instance console output
  StandardOutput=journal+console
  
  [Install]
  WantedBy=cloud-init.target

В версии 24.2 из сизифа:
  [root@ ]# systemctl cat cloud-init.service
  # /usr/lib/systemd/system/cloud-init.service
  [Unit]
  # https://cloudinit.readthedocs.io/en/latest/explanation/boot.html
  Description=Cloud-init: Network Stage
  ConditionVirtualization=yes
  DefaultDependencies=no
  Wants=cloud-init-local.service
  Wants=sshd.service
  After=cloud-init-local.service
  After=systemd-networkd-wait-online.service
  
  After=network.service
  After=NetworkManager.service
  After=NetworkManager-wait-online.service
  Before=network-online.target
  Before=sshd.service
  Before=systemd-user-sessions.service
  ConditionPathExists=!/etc/cloud/cloud-init.disabled
  ConditionKernelCommandLine=!cloud-init=disabled
  ConditionEnvironment=!KERNEL_CMDLINE=cloud-init=disabled
  
  [Service]
  Type=oneshot
  ExecStart=/usr/bin/cloud-init init
  RemainAfterExit=yes
  TimeoutSec=0
  
  # Output needs to appear in instance console output
  StandardOutput=journal+console
  
  [Install]
  WantedBy=cloud-init.target</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251407</commentid>
    <comment_count>1</comment_count>
    <who name="Arseny Maslennikov">arseny</who>
    <bug_when>2024-09-09 14:49:32 +0300</bug_when>
    <thetext>...Таким образом, в сизифе проблемы нет.
Прошу исправить в p11 наиболее удобным мейнтейнеру пакета способом. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>251408</commentid>
    <comment_count>2</comment_count>
    <who name="Arseny Maslennikov">arseny</who>
    <bug_when>2024-09-09 15:03:20 +0300</bug_when>
    <thetext>...Эта бага усугублена тем, что совершить chroot в записанный cloud image и обновить там пакеты до инициализации невозможно (она начинается в posttrans или ранее), а это неприемлемо в nocloud-сценарии, где user-data нужно скачать из сети.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>