Tag: ipmi

  • Resetting a Lost BMC Password with ipmitool

    Resetting a Lost BMC Password with ipmitool

    I recently got my hands on a couple of gigabyte servers. These machines came preinstalled with Ubuntu 20.04. Credentials for a OS local user account were on a sticker on the machines. However there was no indication of what the BMC credentials were. According to this document, there should be default credentials that we can use on the motherboard, however, they were not working.

    These machines came with Ubuntu 20.04 on them, and did not have ipmitool installed.

    $ sudo apt install ipmitool --fix-missing

    Once installed we need to determine what BMC users exist.

    $ sudo ipmitool user list 1

    In the output below you can see that there is one user – “admin” – identified as ID #2

    Now lets reset the password for “admin”.

    $ sudo ipmitool user set password 2

    We are then prompted to create a new password.

    We should now be able to load the BMC web interface and login with our new credentials

  • OpenStack Ironic – CLI Cheat Sheet

    home-iron

    Ironic is the baremetal provisioning component of OpenStack. Ironic interacts with hardware through a set of plug-ins. Technologies leveraged are PXE and IPMI as well as a few vendor specific plug-ins.

    Here are a few OpenStack Ironic commands that I have found useful when troubleshooting.

    List nodes registered with Ironic.

    $ ironic node-list

     

    Show details of a specific node using the node UUID – your node UUID will differ.

    $ ironic node-show 5492ee96-218f-4e0e-b5b3-4931ba2c9ede

     

    Disable maintenance mode for a specific node.

    $ ironic node-set-maintenance 5492ee96-218f-4e0e-b5b3-4931ba2c9ede off

     

    The command below is useful for watching logs. Note…

    • -u is used to specify the unit
    • -f is used to tail logs

    $sudo journalctl -u openstack-ironic-conductor -u openstack-ironic-api -f

     

    Make a node available for scheduling by nova. Below is an example using a UUID in my environment.

    $ ironic node-set-provision-state 5492ee96-218f-4e0e-b5b3-4931ba2c9ede provide

     

    Show Mac address for a particular ironic node – uses UUID.

    $ ironic node-port-list 5492ee96-218f-4e0e-b5b3-4931ba2c9ede

    More examples to come.

    Delete a node – using UUID

    $ironic node-set-provision-state f7f58a13-1ac8-4d3a-b1b8-e7a02a07a323 deleted

    Force Delete a Node from the Database – Use this option when your node is stuck in the “deleting” Provisioning State.

    Log into mysql database

    [stack@undercloud] # sudo mysql -u root

    Switch to the ironic database

    MariaDB [(none)]> use ironic;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A

    Force state change using UUID of Ironic Node.

    MariaDB [ironic]> UPDATE nodes SET provision_state=”available”, target_provision_state=NULL WHERE uuid=”f7f58a13-1ac8-4d3a-b1b8-e7a02a07a323″;
    Query OK, 1 row affected (0.01 sec)
    Rows matched: 1 Changed: 1 Warnings: 0

    MariaDB [ironic]> exit
    Bye