Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4036  / 2 Years ago, mon, october 24, 2022, 6:01:05

Our maas LAN can't access the internet and has a internal apt-mirror site 192.168.3.6. I changed the mirror set of maas server's snippets/maas_proxy file as follows:



d-i     mirror/country string manual
d-i mirror/http/hostname string 192.168.3.6
d-i mirror/http/directory string /ubuntu
d-i mirror/http/proxy string


I deployed two maas node. Dashboard show the two node's state are ready.
But node's cloud-init client changed the apt's sources.list like this:



## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
...
deb http://archive.ubuntu.com/ubuntu precise main
deb-src http://archive.ubuntu.com/ubuntu precise main
...


Directly use cobbler install node(without maas), the node apt's sources.list like:



...
deb http://192.168.3.6/ubuntu precise main
deb-src http://192.168.3.6/ubuntu precise main
...


My question is:




  1. How to set user-data in maas? So that I can set cloud-init's mirror's url to 192.168.3.6 or prevent cloud-init to change mirror's url.

  2. Maas node's file /home/ubuntu/.ssh/authorized_keys is empty. Is it caused by the mirror's setup?


More From » maas

 Answers
1

OK, we can complete node installation by add a line in /var/lib/cobbler/snippets/maas_preseed like:



 $maas_preseed_data    
cloud-init cloud-init/local-cloud-config string manage_etc_hosts: localhost
+cloud-init cloud-init/local-cloud-config string apt_preserve_sources_list: true


In factor, cloud-init/local-cloud-config is the cloud-init's local configer.


[#37990] Tuesday, October 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utilitere

Total Points: 394
Total Questions: 110
Total Answers: 114

Location: Solomon Islands
Member since Wed, Mar 29, 2023
1 Year ago
;