MAAS 无法更新

MAAS 无法更新

我正在为我们的工作站设置 MAAS,一切进展顺利!我已经用它部署了一个测试虚拟机。唯一不起作用的是 apt。

我无法执行apt update。它查找172-16-0-0--16.maas-internal但我不知道它从哪里获取它。

这是完整的输出:

~# apt update
Err:1 http://packages.microsoft.com/repos/vscode stable InRelease
  Could not resolve '172-16-0-0--16.maas-internal'
Err:2 http://aptly bionic InRelease            
  Could not resolve '172-16-0-0--16.maas-internal'
Err:3 http://aptly bionic-updates InRelease    
  Could not resolve '172-16-0-0--16.maas-internal'
Err:4 http://aptly bionic-security InRelease
  Could not resolve '172-16-0-0--16.maas-internal'
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
W: Failed to fetch http://aptly/dists/bionic/InRelease  Could not resolve '172-16-0-0--16.maas-internal'
W: Failed to fetch http://aptly/dists/bionic-updates/InRelease  Could not resolve '172-16-0-0--16.maas-internal'
W: Failed to fetch http://aptly/dists/bionic-security/InRelease  Could not resolve '172-16-0-0--16.maas-internal'
W: Failed to fetch http://packages.microsoft.com/repos/vscode/dists/stable/InRelease  Could not resolve '172-16-0-0--16.maas-internal'
W: Some index files failed to download. They have been ignored, or old ones used instead.

这是我的/etc/apt/sources.list文件:

# Aptly 
deb [trusted=yes arch=amd64] http://aptly/ bionic main universe 
deb [trusted=yes arch=amd64] http://aptly/ bionic-updates main universe
deb [trusted=yes arch=amd64] http://aptly/ bionic-security main universe

我也尝试使用默认设置sources.list,但出现了同样的错误。

/etc/resolv.conf文件仅指向我的 DNS 服务器。

无论我把什么放入sources.list文件,它都会一直抱怨172-16-0-0--16.maas-internal。它为什么要寻找172-16-0-0--16.maas-internal?它是什么?我可以绕过它吗?我必须设置新的 DNS 记录吗?我怎样才能让 apt 正常工作?

非常感谢!

答案1

不得不删除/etc/apt/apt.conf.d/90curtin-aptproxy

答案2

看起来您已编辑了网络配置。如果您已编辑,请尝试以下步骤:

  1. 您需要将 MAAS IP 地址设置为您尝试连接的所有节点的 DNS apt update

例子

    enp3:
      match:
        macaddress: 62:34:0f:91:1b:e2
      addresses:
       - 172.168.0.12/24
      gateway4: 172.168.0.10
      mtu: 1500
      nameservers:
        addresses:
          - 172.168.0.16 #<<<< IP OF THE MAAS INTERFACE #
      set-name: enp3

  1. 转到 MAAS 子网并设置正确的 DNS 名称。请参阅所附屏幕截图。 在此处输入图片描述

  2. 最后,为了使更改生效,请重新启动您的 maas 网络sudo systemctl restart systemd-networkd和节点或重新启动。

相关内容