forked from rook/rook
To enable multiple mgrs to run properly, we need to set the respective server_addr path with the mgr's name for the modules of each mgr. When multiple mgrs are running, the modules( e.g. dashboard and Prometheus ) of each mgr need to bind its own server_addr when it is started. The way to get server_addr when ceph mgr starts the module is as follows: first, get the server_addr value by "mgr/<module-name>/<mgr-daemonid>/server_addr" path; and if this path does not exist, then get the server_addr value by" mgr/<module-name>/server_addr" path. According to the original rook setting for server_addr, the modules of all mgrs take the same server_addr on ceph luminous and mimic, this produces a wrong result that only one mgr's modules can run properly ( the modules of other mgrs failed to start with the wrong server_addr). This change is made to be compatible with ceph luminous, mimic, and nautilus. and Modify according to: the "HOST NAME AND PORT" description of http://docs.ceph.com/docs/master/mgr/dashboard/ . Signed-off-by: wangxiao86 <wangxiao1@sensetime.com>