Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server manager should set pxe as "next boot" before actually rebooting the node #63

Open
bhimanshu opened this issue Apr 3, 2019 · 0 comments

Comments

@bhimanshu
Copy link

bhimanshu commented Apr 3, 2019

For server manager to reimage a node we need to change the boot priority on the host by setting pxe boot as the first priority.

This manual step can be avoided if we can set the one time boot to pxe before cobbler starts reimaging the node. Suggestion :

add the below code to def _power_cycle_servers in /opt/contrail/server_manager/server_mgr_main.py

7348 if server['ipmi_address']:
7349 db_servers = self._serverDb.get_server(
7350 {"id" : server['id']},
7351 None, True)
7352 #import pdb;pdb.set_trace()
7353 cmd = "ipmitool -I lanplus -U %s -P %s -H %s chassis bootdev pxe" % (db_servers[0]['ipmi_username'],db_servers[0]['ipmi_password'],db_servers[0]['ipmi _address'])
7354 subprocess.check_call(cmd, shell=True)
7355 power_reboot_list.append(
7356 server['id'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant