gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

gpinitsystem: Making sure that host-name filed is populated with host-name

Open piyushc01 opened this issue 2 years ago • 1 comments

Making sure that the gpinitsystem populates correct value in gp_segment_configuration table with the right value of segment host-name for primary and mirror segments. Ran manual tests on ByoL cluster with mirror and standby configuration. Concourse pipeline is almost green.

Prior to change:

psql -c " select * from gp_segment_configuration" -t template1
    1 |      -1 | p    | p              | n    | u      | 5432 | mdw-1    | mdw-1   | /data/master/gpseg-1
    2 |       0 | p    | p              | n    | u      | 6000 | sdw1-2   | sdw1-2  | /data1/primary/gpseg0
    4 |       2 | p    | p              | n    | u      | 6000 | sdw2-3   | sdw2-3  | /data1/primary/gpseg2
    3 |       1 | p    | p              | n    | u      | 6001 | sdw1-2   | sdw1-2  | /data2/primary/gpseg1
    5 |       3 | p    | p              | n    | u      | 6001 | sdw2-3   | sdw2-3  | /data2/primary/gpseg3

After the change(and adding mirror and standby):

psql -c " select * from gp_segment_configuration" -t template1
    1 |      -1 | p    | p              | n    | u      | 5432 | mdw      | mdw     | /data/master/gpseg-1
    4 |       2 | p    | p              | s    | u      | 6000 | sdw2     | sdw2-3  | /data1/primary/gpseg2
    8 |       2 | m    | m              | s    | u      | 7000 | sdw1     | sdw1-2  | /data1/mirror/gpseg2
    2 |       0 | p    | p              | s    | u      | 6000 | sdw1     | sdw1-2  | /data1/primary/gpseg0
    6 |       0 | m    | m              | s    | u      | 7000 | sdw2     | sdw2-3  | /data1/mirror/gpseg0
    3 |       1 | p    | p              | s    | u      | 6001 | sdw1     | sdw1-2  | /data2/primary/gpseg1
    7 |       1 | m    | m              | s    | u      | 7001 | sdw2     | sdw2-3  | /data2/mirror/gpseg1
    5 |       3 | p    | p              | s    | u      | 6001 | sdw2     | sdw2-3  | /data2/primary/gpseg3
    9 |       3 | m    | m              | s    | u      | 7001 | sdw1     | sdw1-2  | /data2/mirror/gpseg3

Here are some reminders before you submit the pull request

  • [ ] Add tests for the change
  • [ ] Document changes
  • [ ] Communicate in the mailing list if needed
  • [ ] Pass make installcheck
  • [ ] Review a PR in return to support the community

piyushc01 avatar Jun 23 '22 18:06 piyushc01

Couple of initial comments

  1. Is it not possible to add tests for this PR ? Looks like this was a bug for which there were no tests, so it would be good if we can add tests in this PR
  2. Can you explain the problem in a bit more detail in the commit message and also how this commit fixes the issue ?

kaknikhil avatar Jun 24 '22 07:06 kaknikhil