Skip to content

Commit

Permalink
Merge pull request ceph#50167 from trociny/wip-58792
Browse files Browse the repository at this point in the history
mgr/cephadm: don't add mgr into iscsi trusted_ip_list if it's already there

Reviewed-by: Adam King <[email protected]>
  • Loading branch information
adk3798 authored Mar 7, 2023
2 parents 251c3d4 + 4a74a02 commit a42a673
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pybind/mgr/cephadm/services/iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ def config(self, spec: IscsiServiceSpec) -> None: # type: ignore
def get_trusted_ips(self, spec: IscsiServiceSpec) -> str:
# add active mgr ip address to trusted list so dashboard can access
trusted_ip_list = spec.trusted_ip_list if spec.trusted_ip_list else ''
if trusted_ip_list:
trusted_ip_list += ','
trusted_ip_list += self.mgr.get_mgr_ip()
mgr_ip = self.mgr.get_mgr_ip()
if mgr_ip not in [s.strip() for s in trusted_ip_list.split(',')]:
if trusted_ip_list:
trusted_ip_list += ','
trusted_ip_list += mgr_ip
return trusted_ip_list

def prepare_create(self, daemon_spec: CephadmDaemonDeploySpec) -> CephadmDaemonDeploySpec:
Expand Down

0 comments on commit a42a673

Please sign in to comment.