XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    cloud-init : Cannot read properties of undefined (reading 'forEach')

    Scheduled Pinned Locked Moved Advanced features
    5 Posts 2 Posters 20 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      carloum70
      last edited by carloum70

      Hi all,

      I have the following cloud-config template:

      #cloud-config
      users:
        - name: userx
          groups:
            - sudo
          sudo:
            - ALL=(ALL) NOPASSWD:ALL
          shell: /bin/bash
          ssh_authorized_keys:
            - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5fdsafdasfasfdasfdsafmDSqIko2UD8o userx@clientx.local"code_text
      

      Creating a vm int he XO webinterface failes with the error "Cannot read properties of undefined (reading 'forEach')" when I use this cloud-init template.

      I can run the xo-cli command with the same template without any problem:

      xo-cli vm.create bootAfterCreate=true cloudConfig="$(cat /root/user.yaml)" clone=true name_label="Test VM" template=afde76ab-bfc5-ebd1-3bab-21116e77fc97 hvmBootFirmware=uefi
      efd54d95-32ad-39b7-3d20-55b74b9211fb
      
      root@a5820ee6bc16:~# cat user.yaml 
      #cloud-config
      users:
        - name: userx
          groups:
            - sudo
          sudo:
            - ALL=(ALL) NOPASSWD:ALL
          shell: /bin/bash
          ssh_authorized_keys:
            - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5fdsafdasfasfdasfdsafmDSqIko2UD8o userx@clientx.local"
      

      I am runningen XO in a docker container: image: ronivay/xen-orchestra:latest

      Thanks in advance,
      Carlo

      DanpD 1 Reply Last reply Reply Quote 0
      • DanpD Offline
        Danp Pro Support Team @carloum70
        last edited by

        @carloum70 What is your current commit? Can you show us the complete error log (check under Settings > Logs)?

        C 1 Reply Last reply Reply Quote 0
        • C Offline
          carloum70 @Danp
          last edited by

          @Danp commit: https://github.com/vatesfr/xen-orchestra/commit/a62ac1ab8205ac36d2d60710c6475db41322c2d9

          There is no logging.

          0 fbeauchamp committed to vatesfr/xen-orchestra
          feat(sdn-controller): use host plugin  (#8488)
          
          * feat(sdn-controller): use XCP plugin to manage open switch
          
          try to instantiate the plugin and fall back to direct query
          if it fails
          The plugin allow to define and target multiple bridges in parallel
          
          * feat(sdn-controller): implement network wide rules
          
          this introduce 2 new API method sdnController.addNetworkRule
          and sdnController.deleteNetworkRule
          Theses methods will only work with the plugin, and can't work with
          the legacy ( direct channel) approach
          C 1 Reply Last reply Reply Quote 0
          • C Offline
            carloum70 @carloum70
            last edited by

            After updating the docker image to the latest version ( commit 82891 )I can create a VM without any problem. Thank you for pointing me in the right direction.

            DanpD 1 Reply Last reply Reply Quote 0
            • DanpD Offline
              Danp Pro Support Team @carloum70
              last edited by

              @carloum70 You're welcome! It's always best to test using the latest source to avoid reporting an issue that has already been fixed. 😉

              1 Reply Last reply Reply Quote 0
              • First post
                Last post