Skip to content

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

@bhimanshu

Description

@bhimanshu

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'])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions