Skip to content

Conversation

shogondo
Copy link

Hi,

I faced a problem that I cannot use --proxy option on cron job with 'Too many arguments.' error.

Currently, /etc/cron.d/codedeploy-agent-update is defined as follows:

# Cron that starts once every day or on reboot, which updates codedeploy-agent.
# This cron file has been fuzzed to run after 04:45:05 every hour.
45 4 * * * root /bin/sleep 5; /opt/codedeploy-agent/bin/update --sanity-check --upgrade rpm
15 * * * * root /bin/sleep 5; /opt/codedeploy-agent/bin/update --sanity-check --downgrade rpm
@reboot root /bin/sleep 45; /opt/codedeploy-agent/bin/update --sanity-check rpm

According to https://github.com/aws/aws-codedeploy-agent/blob/master/bin/update#L135, update script can be passed up to 4 arguments. So I cannot set proxy like 45 4 * * * root /bin/sleep 5; /opt/codedeploy-agent/bin/update --sanity-check --upgrade --proxy http://x.x.x.x:yyy rpm.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.779% when pulling 82e7702 on shoutakenaka:update_with_proxy into 528b8f1 on aws:master.

@rohkat-aws
Copy link
Contributor

@shoutakenaka can you add some tests for this change?

@shogondo
Copy link
Author

@rohkat-aws I cannot find test/spec/feature for bin/update. Is there no automated tests of this script for now?

@rohkat-aws
Copy link
Contributor

@shoutakenaka could you confirm that your contribution is being made under the terms of the Apache 2.0 license?

@rohkat-aws
Copy link
Contributor

closing this as did not get a reply, will be adding the change from a new commit.

@rohkat-aws rohkat-aws closed this Jun 8, 2018
@shogondo
Copy link
Author

shogondo commented Sep 4, 2019

@rohkat-aws Sorry for my late reply. I confirm that my contribution is made under the terms of the Apache 2.0 license.

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.

3 participants