[dnm] set trap signal

Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I327851d0c918398662c7b7cc7807aa7a58b7e703
This commit is contained in:
Ruslan Aliev 2023-06-05 18:17:08 -05:00
parent 275dc4506f
commit 313176cd8e
1 changed files with 10 additions and 0 deletions

View File

@ -12,6 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import signal
import sys
import pdb
from urllib.parse import urlparse
import click
@ -27,6 +31,10 @@ from armada.common.session import ArmadaSession
CONF = cfg.CONF
def signal_handler(sig, frame):
pdb.set_trace()
@click.group()
@click.option('--debug', help="Enable debug logging", is_flag=True)
@click.option(
@ -77,6 +85,8 @@ def main(ctx, debug, api, url, token):
log.set_defaults(default_log_levels=CONF.default_log_levels)
log.setup(CONF, 'armada')
signal.signal(signal.SIGUSR1, signal_handler)
log.INFO("SIGNAL TRAP SET")
main.add_command(apply_create)