Giter Club home page Giter Club logo

Comments (19)

arieleeuw avatar arieleeuw commented on August 10, 2024 2

Alberto,

In order to extend to another account:
-Login to that account
-Create a stack in that account using this template https://s3.amazonaws.com/solutions-reference/aws-instance-scheduler/latest/instance-scheduler-remote.template
-Enter the number of the account in which the Scheduler is deployed
-The stack creates a cross account role that gives the Scheduler account permissions to make the required calls
-In the output from the stack locate the arn of the created role
-Log in to the scheduler account and update the scheduler stack, enter the arn of the cross account role in the list of accounts in which you want to scheduler instances

from instance-scheduler-on-aws.

arieleeuw avatar arieleeuw commented on August 10, 2024 1

It might be the fact that in the up period the begintime > endtime which is not allowed (we do not support wrapping of times as this might conflict with the weekdays specifications). In the log stream you can see the message "stop_date must be equal or later than start_date" at the point the scheduler loads the configuration and it skip the invalid period and the schedule it is used in. Normally these situations are caught by the CLI when you create the periods that uses the same code as the scheduler to check the schedule/period data.

you case you need 3 periods
up1 -> 00:00-00:15
down -> 00:16-06:15
up2-> 06:16-23:59

The scheduler will stop/start the instances at 00:16 and 06:16 to resize it

If this schedule needs to run every day with the same times you can omit the weekdays as well.

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

Thanks a lot. It works perfectly.

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

Hi,

in order to create periods and schedules i use dynamoDB console and some of them are working but the rest don't. I get the following warning in the CloudWatch logs:

2018-03-17 - 23:56:14.401 - WARNING : Skipping instance EC2:i-0487694xxxx33dbef (ServerEnterprise) in region eu-west-1 for account 7xxxxx09562, schedule name "esc-vertical" is unknown

Any idea whats is going on?

Thanks

from instance-scheduler-on-aws.

arieleeuw avatar arieleeuw commented on August 10, 2024

This means that the scheduler has found an instance with the tag you used for specifying the name of the schedule, but it can not find that schedule in the dynamodb configuration table. Make sure there is an entry of type schedule in the database with exactly that name. (case sensitive and beware of leading and training spaces)
A simple way to test is to the the scheduler-cli describe-schedules command that uses the same logic as the configuration reader of the scheduler.

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

Thank you for your response. Unfortunately, i am still having the same issue and the scheduler-cli describe function detetcts the entries,

{
"Schedules": [
{
"Timezone": "Europe/Madrid",
"Name": "demanda",
"Type": "schedule",
"Description": "Vertical scaling",
"Periods": [
"[email protected]",
"[email protected]"
]
}

{
"Periods": [
{
"Description": "Down hours",
"Weekdays": [
"mon-sun"
],
"Begintime": "00:16",
"Endtime": "06:15",
"Type": "period",
"Name": "down"
}

{
"Description": "Up hours",
"Weekdays": [
"mon-sun"
],
"Begintime": "06:16",
"Endtime": "00:15",
"Type": "period",
"Name": "up"
}

I also add the tag "Schedule = demanda" in the EC2 instance.

Thanks

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

Thanks again, that was the key. Using CLI everything works fine.

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

Hi arieleeuw ,
I've seen that you are also involved in AWS OpsAutomator solution. I succesfully deployed the solution and i also a Create Snapshot Task but i can not find the snapshot. Where is locate it? i don't receive any error in CloudWatch logs, so i guess it is working fine.

Thnk you in advance.

Alberto.

from instance-scheduler-on-aws.

arieleeuw avatar arieleeuw commented on August 10, 2024

Snaphots are created in the account you are Ops Automator running or in the accounts for which you added cross account roles for in the task. You should see them in the EC2 console under snapshots. Make sure to tag the Instances correctly. The name of the tag is by default OpsAutomatorTaskList and the value should include the name of the task stack you created to configure your task.

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

from instance-scheduler-on-aws.

arieleeuw avatar arieleeuw commented on August 10, 2024

Can you send me the the parameters and/or the configuration records for the task?
What is your cronies interval?

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

3c88568e-0b01-42d8-ba21-e785e10fd936
4928450b-58e2-45c6-afc8-3751daa2cc44

from instance-scheduler-on-aws.

arieleeuw avatar arieleeuw commented on August 10, 2024

from instance-scheduler-on-aws.

randpow avatar randpow commented on August 10, 2024

from instance-scheduler-on-aws.

Toolazy2work avatar Toolazy2work commented on August 10, 2024

So this thread came up with the google search for "schedule name "X" is unknown". I solved the issue by using the correct form for timezone. I was getting the error when using "America/New_York". Im now using "US/Eastern" and it seems to be working. I dont know if this helps you or not, but figured id respond with a positive result.

from instance-scheduler-on-aws.

arieleeuw avatar arieleeuw commented on August 10, 2024

Hi,
Can you please check the original spelling of the timezone you used as this should be a valid timezone. For timezones we use the pytz module and according to this module this is a valid timezone name.

$ python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 12:39:47) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pytz
>>> pytz.timezone("America/New_York")
<DstTzInfo 'America/New_York' LMT-1 day, 19:04:00 STD>
>>> 

from instance-scheduler-on-aws.

shsenior avatar shsenior commented on August 10, 2024

Closing due to time elapsed since last correspondence. Please re-open this if you are still having an issue.

from instance-scheduler-on-aws.

dms1981 avatar dms1981 commented on August 10, 2024

As an addendum to this, the cross account roles are referenced in DynamoDB in the ConfigTable created by the CloudFormation stack. You can see the references in type/Partition Key = Config > cross_account_roles.

from instance-scheduler-on-aws.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.