sbd gethosts returned an empty hostlist

This document (000020357) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise High Availability Extension 15 SP2
SUSE Linux Enterprise High Availability Extension 15 SP1
SUSE Linux Enterprise High Availability Extension 12 SP4

Situation

SBD stonith fails to fence the other node in the cluster even through the stonith-sbd primitive is running in the cluster.
The following messages might be seen in /var/log/messages.
stonith: external_hostlist: 'sbd gethosts' returned an empty hostlist
stonith: Could not list hosts for external/sbd.
stonith-ng[7985]:   notice: Disabling port list queries for stonith-sbd (-61): (null)
crmd[7989]:   notice: Stonith operation 2/1:0:0:1f91ce2b-98b0-4d8e-b2a4-ba4e9902f8f2: No such device (-19)
crmd[7989]:   notice: Stonith operation 2 for node2 failed (No such device): aborting transition.
crmd[7989]:  warning: No devices found in cluster to fence node2, giving up

 

Resolution

Enable the sbd.service so that a slot will be allocated to the quorum disk when it first starts. 
systemctl enable sbd.service
Restart the cluster stack as sbd.service will start as a dependency of pacemaker.service
systemctl stop pacemaker  |  crm cluster stop
systemctl start pacemaker  | crm cluster start

Cause

The SBD quorum partition does not have a slot allocated for the nodes in the cluster.   
The cluster was created without SBD so the "sbd.service" was not enabled. 

To see the node name in the SBD disk slot, you can execute the following command to see cluster nodes allocated slots for each quorum disk. 
sbd -d <device> list
Example:
node1:/ # sbd -d /dev/disk/by-id/scsi-360014052ca3680347a74e9eac60bf0ce-part1 -d /dev/disk/by-id/scsi-360014052ca3680347a74e9eac60bf0ce-part2 -d /dev/disk/by-id/scsi-360014052ca3680347a74e9eac60bf0ce-part3 list
0	node1	clear	
1	node2	clear	
0	node1	clear	
1	node2	clear	
0	node1	clear	
1	node2	clear
To see which devices are configured for SBD, reference the "SBD_DEVICE=" in the /etc/sysconfig/sbd configuration file.   For multiple disks make sure each disk is separated with a semi-colon and surrounded by quotes.
Example: 
SBD_DEVICE="/dev/disk/by-id/scsi-360014052ca3680347a74e9eac60bf0ce-part1;/dev/disk/by-id/scsi-360014052ca3680347a74e9eac60bf0ce-part2;/dev/disk/by-id/scsi-360014052ca3680347a74e9eac60bf0ce-part3"

Additional Information

Related TIDs.
000019877 - SBD STONITH fails to fence other node when using the fully qualified DNS name.
000019101 - sbd resource fails to start if more than one device configured in /etc/sysconfig/sbd

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020357
  • Creation Date: 03-Aug-2021
  • Modified Date:05-Aug-2021
    • SUSE Linux Enterprise High Availability Extension

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center