Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
MiaAltieri committed Feb 23, 2024
1 parent ba6df17 commit 2db1e06
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os
import json
import pwd
import subprocess
from charms.mongodb.v1.helpers import copy_licenses_to_unit, KEY_FILE
from charms.operator_libs_linux.v1 import snap
from pathlib import Path
Expand Down Expand Up @@ -364,12 +363,7 @@ def _generate_relation_departed_key(rel_id: int) -> str:

def open_mongos_port(self) -> None:
"""Opens the mongos port for TCP connections."""
try:
logger.debug("opening tcp port")
subprocess.check_call(["open-port", "{}/TCP".format(Config.MONGOS_PORT)])
except subprocess.CalledProcessError as e:
logger.exception("failed opening port: %s", str(e))
raise
self.unit.open_port("tcp", Config.MONGOS_PORT)

# END: helper functions

Expand Down

0 comments on commit 2db1e06

Please sign in to comment.