Skip to content

Commit

Permalink
Revert "containers/osbuild-composer: wait for fluentd in entrypoint"
Browse files Browse the repository at this point in the history
This reverts commit b4cf032.
No longer needed after removing sidecar COMPOSER-2051
  • Loading branch information
diaasami authored and croissanne committed Nov 28, 2023
1 parent 4050aa9 commit 6b6af41
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions containers/osbuild-composer/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
class Cli(contextlib.AbstractContextManager):
"""Command Line Interface"""

SYSLOG_RETRIES=5
SYSLOG_WAIT=2.0

def __init__(self, argv):
self.args = None
self._argv = argv
Expand Down Expand Up @@ -286,25 +283,6 @@ def _spawn_worker():
stderr=subprocess.STDOUT,
)

@staticmethod
def _wait_for_syslog(addr):
print("Waiting for fluentd syslog server", file=sys.stderr)
for _ in range(Cli.SYSLOG_RETRIES):
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
sock.connect(addr)
except ConnectionRefusedError:
time.sleep(Cli.SYSLOG_WAIT)
continue
except (NameError, ConnectionError) as ex:
print("Unexpected error:", ex , file=sys.stderr)
break
finally:
sock.close()

print("fluentd syslog server is up", file=sys.stderr)
break

@staticmethod
def _spawn_composer(sockets):
cmd = [
Expand Down Expand Up @@ -359,9 +337,6 @@ def handler(signum, frame):
proc_worker = self._spawn_worker()

if any([self.args.weldr_api, self.args.composer_api, self.args.local_worker_api, self.args.remote_worker_api]):
if "SYSLOG_SERVER" in os.environ:
addr, port = os.environ["SYSLOG_SERVER"].split(":")
self._wait_for_syslog((addr, int(port)))
proc_composer = self._spawn_composer(sockets)

if proc_composer:
Expand Down

0 comments on commit 6b6af41

Please sign in to comment.