-
Notifications
You must be signed in to change notification settings - Fork 281
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
scheduler-cli is super frustrating #246
Comments
Hi @sandwormusmc Reviewing your entire comment, looks like you were able to create the periods. Scheduler-cli instructions are provided in the documenation here, let me know if these instructions are not helpful or are missing some details which would have been helpful. We will review the documentation and update it. |
Yes, the help area in the command itself is lacking and it's unclear if the arguments are positional. I think other users of the CLI would find it helpful if the help and documentation were consistent, so rather than opening a browser and searching for the documentation, then the part that is relevant to what they are doing, it could be in the output of -h. Hope I explained that well. |
@sandwormusmc Thanks for the feedback, will review the command line help option and update the documentation. |
I'm not convinced this is completed. I've just started using this command and I've found it to be one of the least friendly CLIs I've encountered in the last few decades.
i.e. it's complaining it doesn't have the argument it's got. I'm sure you can understand why this is frustrating to an end user. After much fiddling about, I eventually found that the key was to ignore the error message it was emitting (because that was a pack of lies) and in fact the command i.e. when it says Having to resort to trial and error and/or guesswork is super frustrating. Y'all need to remove data-duplication / copy-paste in your source code so that all these bits of text are built up from the argument(s) that the command really expects. If you do that, you won't be able to tell the user misleading lies because you'll only have correct argument names available, and when someone changes the code to change the arguments, the generated help/errors will change too. |
@Peter-Darton-i2 Thanks for the feedback! We completely hear you on the difficulties with the CLI and the complexity of the source code. Our team is hard at work on resolving many of these issues. You mentioned that you couldn't configure schedules properly via cloud-formation. Do you have any specific issues that you ran into that were preventing you from creating schedules via CloudFormation? We have a custom-resource that allows schedules to be managed via cloud-formation templates as documented in our implementation guide. You can find several example templates on how to do this here Thanks again for the feedback. I'm reopening this ticket to help with our internal tracking. |
I did (eventually) find examples of configuring schedules via cloud-formation, on the page you linked to ... but unfortunately that's got a broken link so we can't see what the actual expected format is:
...but https://docs.aws.amazon.com/solutions/latest/instance-scheduler-on-aws/appendix-resource is "not a functioning page on our site" The next issue was that when I tried adding custom resources to my template, deployment then failed because it exceeded a 51200 byte limit. ...but not until after I found that the scheduler logic doesn't understand that morning follows night (See #456); I wanted an overnight job and it doesn't seem to understand that jobs can start at 9pm and finish 6 hours later at 3am. So I had to set my jobs to start a minute after midnight instead because that way the CLI's belief that 3am can't be later than 9pm doesn't break things. IMO it would really help if the CFN template included a (commented-out?) example of using CFN to configure it ... although I guess then it'd blow the 50k limit there too :-/ FYI there's also inconsistent links in https://repost.aws/knowledge-center/stop-start-instance-scheduler. One points to a "latest instance-scheduler" which turns out to be version 1.3.3 whereas the other "latest instance-scheduler" is version 1.5.0. Unfortunately I used the first link, not the second, so that cost me a day's rework, at which point the frustration-factor was starting to exceed medically-safe levels... ...and, lastly, my AWS admin tells me that having all the IAM resources bundled up within the same template is frustrating; they're of the opinion that IAM resources should be kept separate from everything else so that the admin can deploy the IAM stuff and then "mere users" (like myself) can "get on with everything else" ... but by that point I'd pretty much lost the will to live and could barely muster a "Meh" in reply. TL;DR: Lots of frustration and wails of "it shouldn't be this hard!" but got there in the end. |
Thanks for the info! I'll see what I can do to get those documentation links corrected. For the 50k limit, this is a general quota limitation of CloudFormation when embedding templates directly in the html request body as described in the documentation here. The fix for this would be to spread the schedules you want to create across multiple stacks or to upload and deploy the template from S3 (which has much higher limitations) |
We have added this to the backlog and it will be prioritized for a future release. |
Some thoughts on scheduler-cli after installing it (had to run sudo, setup.py said to use -d but that option as well as --install-dir didn't work).
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name someprofile describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'someprofile' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile -s instance-scheduler describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'instance-scheduler' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile -s=instance-scheduler describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile --stacks=instance-scheduler describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile --stacks instance-scheduler describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'instance-scheduler' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name someprofile --stacks instance-scheduler describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'someprofile' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name someprofile --stacks instance-scheduler describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'someprofile' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile --stacks instance-scheduler describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'instance-scheduler' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile --stacks=instance-scheduler describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile --stack=instance-scheduler describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --profile-name=someprofile -s=instance-scheduler describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli -s=instance-scheduler --profile-name=someprofile describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --stack=instance-scheduler --profile-name=someprofile describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
mmoldvan ~ projects someprofile keypairs scheduler-cli --stack instance-scheduler --profile-name someprofile describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'instance-scheduler' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --stack instance-scheduler --profile-name=someprofile describe-periods
usage: scheduler-cli [-h] [--version] {create-period,create-schedule,delete-period,delete-schedule,describe-periods,describe-schedule-usage,describe-schedules,update-period,update-schedule} ...
scheduler-cli: error: invalid choice: 'instance-scheduler' (choose from 'create-period', 'create-schedule', 'delete-period', 'delete-schedule', 'describe-periods', 'describe-schedule-usage', 'describe-schedules', 'update-period', 'update-schedule')
mmoldvan ~ projects someprofile keypairs scheduler-cli --stack=instance-scheduler --profile-name=someprofile describe-periods
usage: scheduler-cli describe-periods [-h] [--name NAME] [--query QUERY] [--region REGION] --stack STACK [--profile-name PROFILE_NAME]
scheduler-cli describe-periods: error: the following arguments are required: --stack/-s
FINAL WORKING COMMAND (seems arguments are positional, after all)
mmoldvan ~ projects someprofile keypairs scheduler-cli describe-periods -s instance-scheduler --profile-name=someprofile
{
"Periods": [
{
"Begintime": "00:00",
"Description": "development systems schedule",
"Endtime": "12:00",
"Weekdays": "mon-fri",
"Name": "dev",
"Type": "period"
},
{
"Begintime": "21:00",
"Description": "production systems schedule",
"Endtime": "22:30",
"Weekdays": "mon-fri",
"Name": "prod",
"Type": "period"
}
]
}
The text was updated successfully, but these errors were encountered: