Virt-who service on Red Hat Satellite 6 fails with exception: error: bad character range.
Environment
- Red Hat Satellite 6
Issue
-
Virt-whoservice onRed Hat Satellite 6server fails with below error:error: bad character range -
How to use
filter_regexparameter in virt-who configuration file for using regular expressions?
Resolution
-
Use the below parameters in the affected virt-who configuration file.
filter_hosts=servername0([0-1],|[0-1][0-2]).example.com filter_type=regex -
After making the above changes in virt-who configuration file, run below commands on Satellite server.
# systemctl stop virt-who.service # virt-who -c < virt-who configuration file name> -d -o # systemctl start virt-who.serviceNote: Do not run virt-who deployment commands, as this will remove the manual changes by overwriting virt-who configuration file.
Root Cause
- The error occurred because
filter_type=regexparameter was missing fromvirt-whoconfiguration file. This parameter is required for usingregular expressionstofilter hosts.
Diagnostic Steps
-
Check virt-who service status on Satellite server.
# systemctl status virt-who.service -l ● virt-who.service - Daemon for reporting virtual guest IDs to subscription-manager Loaded: loaded (/usr/lib/systemd/system/virt-who.service; enabled; vendor preset: disabled) Active: active (running) since Tue 2021-09-21 11:48:41 IST; 2s ago Main PID: 21625 (virt-who) Tasks: 8 CGroup: /system.slice/virt-who.service └─21625 /usr/bin/python /usr/bin/virt-who [virtwho.destination_-6954900173952236195 INFO] MainProcess(21625):Thread-6 @subscriptionmanager.p...6073d49f284 Sep 21 11:48:43 satellite.example.com /usr/bin/virt- who[21625]: 2021-09-21 11:48:43,435 [virtwho.destination_-5456464160048940608 ERROR] MainProcess(21625):Thread-5 @virt.py:run:421 - Th... exception: error: bad character range
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments