您好,登录后才能下订单哦!
密码登录
登录注册
点击 登录注册 即表示同意《亿速云用户服务条款》
研究自动化安装cobbler,在进行同步cobbler配置时出现报错
cobbler sync //同步生成dhcp配置文件
dhcpd -t failed Exception occured: <class 'cobbler.cexceptions.CX'> Exception value: 'cobbler trigger failed: cobbler.modules.sync_post_restart_services' Exception Info: File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 82, in run rc = self._run(self) File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 181, in runner return self.remote.api.sync(self.options.get("verbose",False),logger=self.logger) File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 763, in sync return sync.run() File "/usr/lib/python2.7/site-packages/cobbler/action_sync.py", line 144, in run utils.run_triggers(self.api, None, "/var/lib/cobbler/triggers/sync/post/*", logger=self.logger) File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 928, in run_triggers raise CX("cobbler trigger failed: %s" % m.__name__)
看报错是与dhcp服务有关,说明可能是dhcp模板配置错误,进入配置文件中查看,看到果然是地址池配置错误
vi /etc/cobbler/dhcp.template subnet 192.168.109.0 netmask 255.255.255.0 { option routers 192.168.109.1; option domain-name-servers 8.8.8.8; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.1.100 192.168.1.254; //地址池未进行修改 default-lease-time 21600; max-lease-time 43200; next-server $next_server;
subnet 192.168.109.0 netmask 255.255.255.0 { option routers 192.168.109.1; option domain-name-servers 8.8.8.8; option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.109.100 192.168.109.254; //将地址池做修改 default-lease-time 21600; max-lease-time 43200; next-server $next_server;
注意dhcp模板中要修改的地方:subnet、option routers、dns、range dynamic-bootp
修改后重新加载服务,服务成功!
cobbler sync task started: 2019-11-05_011754_sync task started (id=Sync, time=Tue Nov 5 01:17:54 2019) ...... running shell triggers from /var/lib/cobbler/triggers/change/* *** TASK COMPLETE *** //任务完成
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。