« Previous | Next » 

Revision 48ce9fd9

ID48ce9fd9ed51b9bb6b24751fd535e6cb858d994e
Parent b9f72b4e
Child d48663e4

Added by Iustin Pop over 15 years ago

Add checks for tcp/udp port collisions

In case the config file is manually modified, or in case of bugs, the
tcp/udp ports could be reused, which will create various problems
(instances not able to start, or drbd disks not able to communicate).

This patch extends the ConfigWriter.VerifyConfig() method (which is used
in cluster verify) to check for duplicates between:
- the ports used for DRBD disks
- the ports used for network console
- the ports marked as free in the config file

Also, if the cluster parameter ‘highest_used_port’ is actually lower
than the computed highest used port, this is also flagged as an error.

The output from gnt-cluster verify will show (output manually wrapped):

node1 # gnt-cluster verify
  • Verifying global settings
    - ERROR: tcp/udp port 11006 has duplicates: instance3.example.com/network port,
    instance2.example.com/drbd disk sda
    - ERROR: tcp/udp port 11017 has duplicates: instance3.example.com/drbd disk sda,
    instance3.example.com/drbd disk sdb, cluster/port marked as free
    - ERROR: Highest used port mismatch, saved 11010, computed 11017
  • Gathering data (2 nodes)
    ...

Reviewed-by: ultrotter

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences