Monday, August 19, 2019

The elusive Unit with ID "da2cba1f-a856-4a7e-8df0-b6f4101587af" could not be found.

I have some "off" brand MiniPC's that I wanted to add to my home lab.  While trying to register them, they all returned the same message.

HTTP error (404 - Not Found): Unit with ID "da2cba1f-a856-4a7e-8df0-b6f4101587af" could not be found.


I'm not exactly sure, but it seems the bios/efi information is the same across all the boxes.  To get arround the error with subscription-manager I logged directly into https://access.redhat.com/management/systems and added the system manually.   Once I had a UUID I ran subscription-manager again to register the system. 

subscription-manager register --consumerid=

Happy cheap labbing.


Sunday, August 18, 2019

RHV 4.3 misadventures and such

This weekend started like any other.  I had grand hopes for getting my home lab in a place I can focus on OpenShift stuff.  You know,  Install RHV, OpenStack 13, CEPH 3 with RADOS gateway and a few other things.   But it wasn't meant to be.

At least I could get RHV installed on my main Lab box (I'll enumerate my lab later).  It's big enough and fast enough that I can run RHV and put my control plane components on it (Ceph MON's, OpenStack Director, etc) when I get the time.   So I started a RHV 4.3 installation. 

It started pretty harmless.   Follow the pre-reqs, make sure you hardware is right, and set the repos.  Link: https://access.redhat.com/products/red-hat-virtualization/#getstarted

Because of a DNS quirk I introduced last year when wiring NetworkManager, libvirt and dnsmasq together, I had to restart the install more than a dozen times.  One involved having multiple IP's returned for the hypervisor host, which was fixed in my local DNS provider (unbound).  I swapped back and forth between the cockpit and command line installs but it kept failing with an ssh error.   After a lot of googling I landed on the host_key_checking=false ansible setting, and after some lucky guesswork I determined it belonged in the file /usr/share/ovirt-hosted-engine-setup/ansible/ansible.cfg  And while I was in there I added a few performance tweaks, which left it looking like this:

## Modify Ansible to work properly for a lab?
/usr/share/ovirt-hosted-engine-setup/ansible/ansible.cfg
[defaults]
inventory = hooks/inventory
host_key_checking = false
forks = 20


[ssh_connection]
ssh_args = -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey
pipelining = true

This got me past the jankiness above.   

The next error was a very strange parse error dumped by the vdsm-tool for the libvirt module.  The error was super misleading (complicated by my idiocy), so I traced into the code and found a parsing bug in my /etc/libvirt/qemu.conf file.  A long while back I had added nvram  settings so I could boot UEFI vm's.   The solution was to move the closing bracket off its own line.

Error Message:
# vdsm-tool configure --module libvirt

Checking configuration status...

libvirt is not configured for vdsm yet
Traceback (most recent call last):
  File "/usr/bin/vdsm-tool", line 220, in main
    return tool_command[cmd]["command"](*args)
  File "/usr/lib/python2.7/site-packages/vdsm/tool/__init__.py", line 40, in wrapper
    func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/vdsm/tool/configurator.py", line 124, in configure
    if _should_configure(c, pargs.force)]
  File "/usr/lib/python2.7/site-packages/vdsm/tool/configurator.py", line 318, in _should_configure
    if not _validate(c) and not configure_allowed:
  File "/usr/lib/python2.7/site-packages/vdsm/tool/configurator.py", line 85, in _validate
    return getattr(module, 'validate', lambda: True)()
  File "/usr/lib/python2.7/site-packages/vdsm/tool/configurators/libvirt.py", line 72, in validate
    return _isSslConflict()
  File "/usr/lib/python2.7/site-packages/vdsm/tool/configurators/libvirt.py", line 115, in _isSslConflict
    qconf_p.read(confutils.get_file_path('QCONF', FILES))
  File "/usr/lib/python2.7/site-packages/vdsm/tool/configfile.py", line 266, in read
    io.StringIO(u'[root]\n' + f.read())
  File "/usr/lib64/python2.7/ConfigParser.py", line 324, in readfp
    self._read(fp, filename)
  File "/usr/lib64/python2.7/ConfigParser.py", line 546, in _read
    raise e
ParsingError: File contains parsing errors:
[line 760]: u']\n'

These are the offending lines in /etc/libvirt/qemu.conf
nvram = [
"/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd"
]

Here is the fix:
nvram = [ "/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd" ]

The rest of the install proceeded without incident!  WooHoo!!!   I have RHV!


Ugh, what's that Gluster thing?

Monday, November 7, 2016

Reviving a bricked Netgear Nighthawk x6 aka R8000 & Serial Console

Last night I was playing with bonded network interfaces on my personal NAS when my router stopped responding (turns out my Internet provider doesn't like Jumbo Frames!).  I'm using the Tomato by Shibby firmware v136 and was unable to get into the admin console to reset the configuration as my router kept rebooting.  After fiddling for an hour I turned to the interwebs.  It seemed it was time for me to venture into the scary world of Serial Console debugging.

I'm familiar with SSH as I use it on a daily basis for various tasks but was terrified of the unknown.  What is a serial console, why do I have to connect wires between my computer and the device, what's that thingy in the middle.  Luckily google saved the day with a link to this post.

https://www.myopenrouter.com/article/how-set-serial-console-netgear-r8000

Unfortunately, it assumed a few things that were vital to my success.  Once I figured those out all the fear left and I was filled with a nerdy kind of joy.

First, I had to learn what a USB-TTL device was, and what it was for.  The important bits are that this device creates a COM port on your system over USB which a program can connect to and translates it into a simpler communication signal that a lot of hardware can understand.  Lucky for me I had one of these close by as I use them to program Arduino Mini Pro (and others) boards.  Connect the USB end to a computer.  Install the drivers (pain in the rear on Windows 10 if you have a non-prolific board, I'm not going to discuss it here).  Use Windows Device Manager to figure out what COM port it was assigned (COM9 for me).

Second, Opening the router.  Since I don't have pictures yet I'll just say I had to remove 5 screws on the bottom, and 5 from the back of the router, then a gentle push in the right direction and the cover came off.  NOTE: Be very careful as the antenna's are connected to the board with a very small gauge wire.  I had to disconnect the u.FL connector on one antenna to access the Pins shown in the above link.  NOTE2: never power on the router without antenna's attached, it could permanently damage the device!

Third, why is hardware hard?  Only connect 3 pins from the USB-TTL device to the routers board.  Ground, RX & TX.  Ground goes to Ground.  RX goes to TX and TX goes to RX!  :O

Last, software selection and configuration.  Its amazing, I've been working with technology for 30 years and have never learned this before.  Most SSH clients have the option of connecting via a Serial port, instead of a network address.  So, I fired up my trusty XShell client (Paid License even) and set up a new connection.  Protocol: SERIAL, Port: COM9, Baud Rate (115200).  Then Connect!  It works!!!   Actually, I had to work my way through the baud rates to find the right one, common rates are 9600, 19200, 57600 and 115200.  I tried all 4.  The wrong ones just displayed a lot of garbage.  Once I found the right rate the debug messages came through loud and clear.  A simple Ctrl+C opened a prompt, and I was able to "erase nvram".

To be honest, I'm not sure what finally allowed me to connect to my router.  Maybe it was because the internet provider was disconnected from the WAN port.  Maybe having the Serial Console connected prevented the reboots.  Either way I was able to log into the admin console and unset Jumbo frames.  Now I'm a happy camper again.

Until next time!