Skip to content

Shim script for extension handler #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 27, 2016
Merged

Shim script for extension handler #39

merged 1 commit into from
Jul 27, 2016

Conversation

ahmetb
Copy link
Contributor

@ahmetb ahmetb commented Jul 26, 2016

Wrote a bash shim that forwards logs of the handler process
reliably and daemonizes the 'enable' command via nohup .. &.

Adopted from https://github.com/Azure/azure-docker-extension/blob/master/scripts/run-in-background.sh and extended to be used for all commands (not just 'enable')

Fixes #35.


example pstree output

custom-script-extension install (attached to the process tree):

# pstree -ap
bash,1
  `-fake-waagent,79 /sbin/fake-waagent install
      `-custom-script-s,88 ./Extension/bin/custom-script-shim install
          |-custom-script-e,94 /var/lib/waagent/Extension/bin/custom-script-extension install
          `-custom-script-s,91 ./Extension/bin/custom-script-shim install
              `-tee,93 -ia /var/log/azure/custom-script/handler.log

custom-script-extension enable (detached from the process tree):

bash,1
  |-custom-script-e,157 /var/lib/waagent/Extension/bin/custom-script-extension enable
  |   `-sleep,158 100
  |-custom-script-s,138 ./Extension/bin/custom-script-shim enable
  |   `-tee,140 -ia /var/log/azure/custom-script/handler.log

cc: @boumenot

Wrote a bash shim that forwards logs of the handler process
reliably and daemonizes the 'enable' command via `nohup .. &`.

Adopted from https://github.com/Azure/azure-docker-extension/blob/master/scripts/run-in-background.sh
and extended to be used for all commands (not just 'enable')

Fixes #35.
@ahmetb
Copy link
Contributor Author

ahmetb commented Jul 27, 2016

cc: @jasonzio as well, reviews appreciated

@boumenot
Copy link
Member

LGTM.

@ahmetb
Copy link
Contributor Author

ahmetb commented Jul 27, 2016

merging but I appreciate if there are any comments afterwards.

@ahmetb ahmetb merged commit a00233e into Azure:master Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants