Skip to content

Commit

Permalink
pebble: Sleep before starting KFP API server
Browse files Browse the repository at this point in the history
Sleep for 1 second before attempting to start the KFP API server, in
order to avoid issues with Pebble when the corresponding service fails
fast. This is a temporary measure until a fix for canonical/pebble#240
is provided.

Refs #220

Signed-off-by: Phoevos Kalemkeris <[email protected]>
  • Loading branch information
phoevos committed Jun 20, 2023
1 parent b19cf45 commit dc69fc9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion charms/kfp-api/src/charm.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright 2021 Canonical Ltd.
# Copyright 2023 Canonical Ltd.
# See LICENSE file for licensing details.

"""Charm the Kubeflow Pipelines API.
Expand Down Expand Up @@ -67,6 +67,9 @@ def __init__(self, *args):
self._grcp_port = self.model.config["grpc-port"]
self._http_port = self.model.config["http-port"]
self._exec_command = (
# TODO: Remove 'sleep' as soon as a fix for
# https://github.com/canonical/pebble/issues/240 is provided
"sleep 1 && "
"/bin/apiserver "
f"--config={CONFIG_DIR} "
f"--sampleconfig={SAMPLE_CONFIG} "
Expand Down

0 comments on commit dc69fc9

Please sign in to comment.