Re: Review Request 67077: Remove resource properties from ResourceAggregate
> On May 24, 2018, 9:46 p.m., Stephan Erb wrote: > > src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java > > Lines 171-172 (original), 172-176 (patched) > > <https://reviews.apache.org/r/67077/diff/2/?file=2019733#file2019733line172> > > > > The previous check ensured _all_ resources were non-negative. The new > > check only ensures that no negative value is in the list. It could however > > be the case that one is missing entirely. > > > > Thinking about it, this is probably prevented by the validation in the > > ThriftBackfill class. I believe it can be avoided by _ThriftBackfill_ from line 120 to line 125 after the change. - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67077/#review203818 --- On May 29, 2018, 7:49 p.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67077/ > --- > > (Updated May 29, 2018, 7:49 p.m.) > > > Review request for Aurora, Renan DelValle and Stephan Erb. > > > Bugs: AURORA-1975 > https://issues.apache.org/jira/browse/AURORA-1975 > > > Repository: aurora > > > Description > --- > > Remove resource properties from ResourceAggregate > > > Diffs > - > > RELEASE-NOTES.md 5e1f9940a7974e212140b7e5304695afa7f96e78 > api/src/main/thrift/org/apache/aurora/gen/api.thrift > ff48000d613ceef3e03586b94944d13275fb127c > src/main/java/org/apache/aurora/scheduler/http/Quotas.java > aa68c446af7cf52f37cb72d0f115b1be39457988 > src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java > e2750d7343a1ed83feb9f96014e9e61dc6dda1f0 > > src/main/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfill.java > 4425d025b92425b19eead30ceac0bc2466bc606a > src/main/python/apache/aurora/client/api/__init__.py > f6fd1dd6d7c2bdd5bca3037f501b36badab78c75 > src/main/python/apache/aurora/config/resource.py > b2ebd399ccf069b9914ac4bc624685b2cc3679b0 > src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java > 567586fcfb4dda58dc6308fe3d7fe2b7b433db98 > > src/test/java/org/apache/aurora/scheduler/storage/durability/DurableStorageTest.java > fcca9a5ab36e067002f8257fc3e864cc02160207 > > src/test/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfillTest.java > 219576baf331c44535a4e2f95fde5c906bdabe4f > > src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java > 2cf66d8154ad3795989ee9026e45af1be509f244 > src/test/python/apache/aurora/admin/test_admin.py > ebe89b504be57a4258eeea7e3edd053daaa30ce9 > src/test/python/apache/aurora/client/cli/test_quota.py > b56629671035ce6bf1c3bf45c9adeb2c4f108ee8 > src/test/python/apache/aurora/config/test_resources.py > 3ac54909991a123b73e00c59d7269431036cda06 > > src/test/resources/org/apache/aurora/scheduler/storage/durability/goldens/current/saveQuota > 6b0d8003a23b9a0e9de78eed42aed14c6b7dd492 > > > Diff: https://reviews.apache.org/r/67077/diff/3/ > > > Testing > --- > > ./pants test src/test/python/apache/aurora/config > ./pants test src/test/python/apache/aurora/client/cli:cli > ./build-support/jenkins/build.sh > > > Thanks, > > Jing Chen > >
Re: Review Request 67077: Remove resource properties from ResourceAggregate
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67077/ --- (Updated May 29, 2018, 7:49 p.m.) Review request for Aurora, Renan DelValle and Stephan Erb. Bugs: AURORA-1975 https://issues.apache.org/jira/browse/AURORA-1975 Repository: aurora Description --- Remove resource properties from ResourceAggregate Diffs (updated) - RELEASE-NOTES.md 5e1f9940a7974e212140b7e5304695afa7f96e78 api/src/main/thrift/org/apache/aurora/gen/api.thrift ff48000d613ceef3e03586b94944d13275fb127c src/main/java/org/apache/aurora/scheduler/http/Quotas.java aa68c446af7cf52f37cb72d0f115b1be39457988 src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java e2750d7343a1ed83feb9f96014e9e61dc6dda1f0 src/main/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfill.java 4425d025b92425b19eead30ceac0bc2466bc606a src/main/python/apache/aurora/client/api/__init__.py f6fd1dd6d7c2bdd5bca3037f501b36badab78c75 src/main/python/apache/aurora/config/resource.py b2ebd399ccf069b9914ac4bc624685b2cc3679b0 src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java 567586fcfb4dda58dc6308fe3d7fe2b7b433db98 src/test/java/org/apache/aurora/scheduler/storage/durability/DurableStorageTest.java fcca9a5ab36e067002f8257fc3e864cc02160207 src/test/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfillTest.java 219576baf331c44535a4e2f95fde5c906bdabe4f src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java 2cf66d8154ad3795989ee9026e45af1be509f244 src/test/python/apache/aurora/admin/test_admin.py ebe89b504be57a4258eeea7e3edd053daaa30ce9 src/test/python/apache/aurora/client/cli/test_quota.py b56629671035ce6bf1c3bf45c9adeb2c4f108ee8 src/test/python/apache/aurora/config/test_resources.py 3ac54909991a123b73e00c59d7269431036cda06 src/test/resources/org/apache/aurora/scheduler/storage/durability/goldens/current/saveQuota 6b0d8003a23b9a0e9de78eed42aed14c6b7dd492 Diff: https://reviews.apache.org/r/67077/diff/3/ Changes: https://reviews.apache.org/r/67077/diff/2-3/ Testing --- ./pants test src/test/python/apache/aurora/config ./pants test src/test/python/apache/aurora/client/cli:cli ./build-support/jenkins/build.sh Thanks, Jing Chen
Re: Review Request 67077: Remove resource properties from ResourceAggregate
> On May 24, 2018, 9:46 p.m., Stephan Erb wrote: > > api/src/main/thrift/org/apache/aurora/gen/api.thrift > > Lines 290-298 (original) > > <https://reviews.apache.org/r/67077/diff/2/?file=2019731#file2019731line290> > > > > Please add a changelog entry that explains which fields were removed > > from the public API. hey Stephan, I am not sure which file exactly you are referring to. If you mean RELEASE-NOTES, shall we create a new subversion? 0.20.1 or 0.21.0? - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67077/#review203818 --- On May 11, 2018, 3:18 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67077/ > --- > > (Updated May 11, 2018, 3:18 a.m.) > > > Review request for Aurora, Renan DelValle and Stephan Erb. > > > Bugs: AURORA-1975 > https://issues.apache.org/jira/browse/AURORA-1975 > > > Repository: aurora > > > Description > --- > > Remove resource properties from ResourceAggregate > > > Diffs > - > > api/src/main/thrift/org/apache/aurora/gen/api.thrift > ef754e32172e7490a47a13e7b526f243ffa3efeb > src/main/java/org/apache/aurora/scheduler/http/Quotas.java > aa68c446af7cf52f37cb72d0f115b1be39457988 > src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java > e2750d7343a1ed83feb9f96014e9e61dc6dda1f0 > > src/main/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfill.java > 4425d025b92425b19eead30ceac0bc2466bc606a > src/main/python/apache/aurora/client/api/__init__.py > f6fd1dd6d7c2bdd5bca3037f501b36badab78c75 > src/main/python/apache/aurora/config/resource.py > b2ebd399ccf069b9914ac4bc624685b2cc3679b0 > src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java > 567586fcfb4dda58dc6308fe3d7fe2b7b433db98 > > src/test/java/org/apache/aurora/scheduler/storage/durability/DurableStorageTest.java > 3dd9ce4039b223cb6156462d089f7062a1cde772 > > src/test/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfillTest.java > 219576baf331c44535a4e2f95fde5c906bdabe4f > > src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java > 2cf66d8154ad3795989ee9026e45af1be509f244 > src/test/python/apache/aurora/admin/test_admin.py > ebe89b504be57a4258eeea7e3edd053daaa30ce9 > src/test/python/apache/aurora/client/cli/test_quota.py > b56629671035ce6bf1c3bf45c9adeb2c4f108ee8 > src/test/python/apache/aurora/config/test_resources.py > 3ac54909991a123b73e00c59d7269431036cda06 > > src/test/resources/org/apache/aurora/scheduler/storage/durability/goldens/current/saveQuota > 6b0d8003a23b9a0e9de78eed42aed14c6b7dd492 > > > Diff: https://reviews.apache.org/r/67077/diff/2/ > > > Testing > --- > > ./pants test src/test/python/apache/aurora/config > ./pants test src/test/python/apache/aurora/client/cli:cli > ./build-support/jenkins/build.sh > > > Thanks, > > Jing Chen > >
Re: Review Request 67077: Remove resource properties from ResourceAggregate
> On May 22, 2018, 10:32 p.m., Renan DelValle wrote: > > src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java > > Lines 174 (patched) > > <https://reviews.apache.org/r/67077/diff/2/?file=2019733#file2019733line174> > > > > nit: can you put these in parentheses so that it's clearer? I.e. > > > > `((resource.isSetNumCpus() && resource.getNumCpus()) > > ||(resource.isSetRamMb() && resource.getRamMb() < 0) || > > (resource.isSetDiskMb() && resource.getDiskMb() < 0))` Hi Renan, I agree that it makes code clearer, I don't put parentheses here as it breaks checkstyle which tells `Useless parentheses`. - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67077/#review203607 --- On May 11, 2018, 3:18 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/67077/ > --- > > (Updated May 11, 2018, 3:18 a.m.) > > > Review request for Aurora, Renan DelValle and Stephan Erb. > > > Bugs: AURORA-1975 > https://issues.apache.org/jira/browse/AURORA-1975 > > > Repository: aurora > > > Description > --- > > Remove resource properties from ResourceAggregate > > > Diffs > - > > api/src/main/thrift/org/apache/aurora/gen/api.thrift > ef754e32172e7490a47a13e7b526f243ffa3efeb > src/main/java/org/apache/aurora/scheduler/http/Quotas.java > aa68c446af7cf52f37cb72d0f115b1be39457988 > src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java > e2750d7343a1ed83feb9f96014e9e61dc6dda1f0 > > src/main/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfill.java > 4425d025b92425b19eead30ceac0bc2466bc606a > src/main/python/apache/aurora/client/api/__init__.py > f6fd1dd6d7c2bdd5bca3037f501b36badab78c75 > src/main/python/apache/aurora/config/resource.py > b2ebd399ccf069b9914ac4bc624685b2cc3679b0 > src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java > 567586fcfb4dda58dc6308fe3d7fe2b7b433db98 > > src/test/java/org/apache/aurora/scheduler/storage/durability/DurableStorageTest.java > 3dd9ce4039b223cb6156462d089f7062a1cde772 > > src/test/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfillTest.java > 219576baf331c44535a4e2f95fde5c906bdabe4f > > src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java > 2cf66d8154ad3795989ee9026e45af1be509f244 > src/test/python/apache/aurora/admin/test_admin.py > ebe89b504be57a4258eeea7e3edd053daaa30ce9 > src/test/python/apache/aurora/client/cli/test_quota.py > b56629671035ce6bf1c3bf45c9adeb2c4f108ee8 > src/test/python/apache/aurora/config/test_resources.py > 3ac54909991a123b73e00c59d7269431036cda06 > > src/test/resources/org/apache/aurora/scheduler/storage/durability/goldens/current/saveQuota > 6b0d8003a23b9a0e9de78eed42aed14c6b7dd492 > > > Diff: https://reviews.apache.org/r/67077/diff/2/ > > > Testing > --- > > ./pants test src/test/python/apache/aurora/config > ./pants test src/test/python/apache/aurora/client/cli:cli > ./build-support/jenkins/build.sh > > > Thanks, > > Jing Chen > >
Re: Review Request 67077: Remove resource properties from ResourceAggregate
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67077/ --- (Updated May 11, 2018, 3:18 a.m.) Review request for Aurora, Renan DelValle and Stephan Erb. Bugs: AURORA-1975 https://issues.apache.org/jira/browse/AURORA-1975 Repository: aurora Description --- Remove resource properties from ResourceAggregate Diffs (updated) - api/src/main/thrift/org/apache/aurora/gen/api.thrift ef754e32172e7490a47a13e7b526f243ffa3efeb src/main/java/org/apache/aurora/scheduler/http/Quotas.java aa68c446af7cf52f37cb72d0f115b1be39457988 src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java e2750d7343a1ed83feb9f96014e9e61dc6dda1f0 src/main/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfill.java 4425d025b92425b19eead30ceac0bc2466bc606a src/main/python/apache/aurora/client/api/__init__.py f6fd1dd6d7c2bdd5bca3037f501b36badab78c75 src/main/python/apache/aurora/config/resource.py b2ebd399ccf069b9914ac4bc624685b2cc3679b0 src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java 567586fcfb4dda58dc6308fe3d7fe2b7b433db98 src/test/java/org/apache/aurora/scheduler/storage/durability/DurableStorageTest.java 3dd9ce4039b223cb6156462d089f7062a1cde772 src/test/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfillTest.java 219576baf331c44535a4e2f95fde5c906bdabe4f src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java 2cf66d8154ad3795989ee9026e45af1be509f244 src/test/python/apache/aurora/admin/test_admin.py ebe89b504be57a4258eeea7e3edd053daaa30ce9 src/test/python/apache/aurora/client/cli/test_quota.py b56629671035ce6bf1c3bf45c9adeb2c4f108ee8 src/test/python/apache/aurora/config/test_resources.py 3ac54909991a123b73e00c59d7269431036cda06 src/test/resources/org/apache/aurora/scheduler/storage/durability/goldens/current/saveQuota 6b0d8003a23b9a0e9de78eed42aed14c6b7dd492 Diff: https://reviews.apache.org/r/67077/diff/2/ Changes: https://reviews.apache.org/r/67077/diff/1-2/ Testing --- ./pants test src/test/python/apache/aurora/config ./pants test src/test/python/apache/aurora/client/cli:cli ./build-support/jenkins/build.sh Thanks, Jing Chen
Review Request 67077: Remove resource properties from ResourceAggregate
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/67077/ --- Review request for Aurora, Renan DelValle and Stephan Erb. Bugs: AURORA-1975 https://issues.apache.org/jira/browse/AURORA-1975 Repository: aurora Description --- Remove resource properties from ResourceAggregate Diffs - api/src/main/thrift/org/apache/aurora/gen/api.thrift ef754e32172e7490a47a13e7b526f243ffa3efeb src/main/java/org/apache/aurora/scheduler/http/Quotas.java aa68c446af7cf52f37cb72d0f115b1be39457988 src/main/java/org/apache/aurora/scheduler/quota/QuotaManager.java e2750d7343a1ed83feb9f96014e9e61dc6dda1f0 src/main/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfill.java 4425d025b92425b19eead30ceac0bc2466bc606a src/main/python/apache/aurora/client/api/__init__.py f6fd1dd6d7c2bdd5bca3037f501b36badab78c75 src/main/python/apache/aurora/config/resource.py b2ebd399ccf069b9914ac4bc624685b2cc3679b0 src/test/java/org/apache/aurora/scheduler/resources/ResourceTestUtil.java 567586fcfb4dda58dc6308fe3d7fe2b7b433db98 src/test/java/org/apache/aurora/scheduler/storage/durability/DurableStorageTest.java 3dd9ce4039b223cb6156462d089f7062a1cde772 src/test/java/org/apache/aurora/scheduler/storage/durability/ThriftBackfillTest.java 219576baf331c44535a4e2f95fde5c906bdabe4f src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java 2cf66d8154ad3795989ee9026e45af1be509f244 src/test/python/apache/aurora/client/cli/test_quota.py b56629671035ce6bf1c3bf45c9adeb2c4f108ee8 src/test/python/apache/aurora/config/test_resources.py 3ac54909991a123b73e00c59d7269431036cda06 src/test/resources/org/apache/aurora/scheduler/storage/durability/goldens/current/saveQuota 6b0d8003a23b9a0e9de78eed42aed14c6b7dd492 Diff: https://reviews.apache.org/r/67077/diff/1/ Testing --- ./pants test src/test/python/apache/aurora/config ./pants test src/test/python/apache/aurora/client/cli:cli ./build-support/jenkins/build.sh Thanks, Jing Chen
Review Request 66980: aurora update info command should print out update metadata
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/66980/ --- Review request for Aurora, Renan DelValle and Stephan Erb. Bugs: AURORA-1906 https://issues.apache.org/jira/browse/AURORA-1906 Repository: aurora Description --- aurora update info command should print out update metadata * Metadata is represented as a list of key value pair Diffs - src/main/python/apache/aurora/client/cli/update.py 7abc5d1f124025e1dcd87acc1b767b4920c5a268 src/test/python/apache/aurora/client/cli/test_supdate.py a3bb5b931cf790d1bbbce7b2d26ce8b7363107ae Diff: https://reviews.apache.org/r/66980/diff/1/ Testing --- ./pants test src/test/python/apache/aurora/client/cli:cli For example, JSON output: ``` { "status": "ROLLED_FORWARD", "started": 1525654336187, "update_events": [ { "status": "ROLLING_FORWARD", "timestampMs": 1525654336187 }, { "status": "ROLLED_FORWARD", "timestampMs": 1525654384329 } ], "job": "devcluster/www-data/devel/hello_world", "last_modified": "2018-05-07T00:53:04", "updateId": "b88218c4-43ee-42e6-b688-325ce181d9ee", "instance_update_events": [ { "action": "INSTANCE_UPDATING", "instance": 0, "timestamp": 1525654336206 }, { "action": "INSTANCE_UPDATED", "instance": 0, "timestamp": 1525654384329 } ], "metadata": [ { "org.apache.aurora.client.update_id": "57bf7161-23eb-4e8a-9d7f-099910a8d9ae" } ] } ``` Normal output: ``` Job: devcluster/www-data/devel/hello_world, UpdateID: b88218c4-43ee-42e6-b688-325ce181d9ee Started 2018-05-07T00:52:16, last activity: 2018-05-07T00:53:04 Current status: ROLLED_FORWARD Update events: Status: ROLLING_FORWARD at 2018-05-07T00:52:16 Status: ROLLED_FORWARD at 2018-05-07T00:53:04 Instance events: Instance 0 at 2018-05-07T00:52:16: INSTANCE_UPDATING Instance 0 at 2018-05-07T00:53:04: INSTANCE_UPDATED Metadata: org.apache.aurora.client.update_id: 57bf7161-23eb-4e8a-9d7f-099910a8d9ae ``` Thanks, Jing Chen
Re: Review Request 64341: Add metadata field to Job object in DSL
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64341/ --- (Updated Dec. 17, 2017, 3:24 p.m.) Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner. Changes --- remove redundencies in unit test Bugs: AURORA-1898 https://issues.apache.org/jira/browse/AURORA-1898 Repository: aurora Description --- Add metadata field to Job object in DSL Diffs (updated) - RELEASE-NOTES.md 54dcc75ef4f4fbf52c4dc60ec0dcbdd7ff3926a2 docs/reference/configuration.md 67d9914f6b43f5eb73fe05b547981737f665489c src/main/python/apache/aurora/config/schema/base.py a466e78f85d980dc11689ab252b8c70e9cfd3d57 src/main/python/apache/aurora/config/thrift.py eb0014422f99fdc8dcea9b0b75b86cdf78cf2dbb src/test/python/apache/aurora/client/cli/test_inspect.py ecefc1845350242fe5113e5c85c4e3db09937ec1 src/test/python/apache/aurora/config/test_thrift.py 76d0ad681689e7aa03401ecea2d2b3123268d7da Diff: https://reviews.apache.org/r/64341/diff/3/ Changes: https://reviews.apache.org/r/64341/diff/2-3/ Testing --- Test with `.aurora` file as: ``` pkg_path = '/vagrant/hello.py' install = Process( name='fetch package', cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) runner = Process( name='hello world', cmdline='python -u hello.py') hello_task = SequentialTask( processes=[install, runner], resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) jobs = [ Service(cluster='devcluster', role='www-data', environment='devel', name='metadata_test', task=hello_task, metadata=[Metadata(key='state', value='CA'), Metadata(key='stat', value='NY')] ) ] ``` Metadata information can be found in **job configuration** of UI as: ``` METADATA state: CA stat: NY ``` Thanks, Jing Chen
Re: Review Request 64341: Add metadata field to Job object in DSL
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64341/ --- (Updated Dec. 11, 2017, 11:13 a.m.) Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner. Changes --- intoduce _Metadata_ object, add a test case for metadata with **colliding keys** and a test case for **duplicate metadata** Bugs: AURORA-1898 https://issues.apache.org/jira/browse/AURORA-1898 Repository: aurora Description --- Add metadata field to Job object in DSL Diffs (updated) - RELEASE-NOTES.md 54dcc75ef4f4fbf52c4dc60ec0dcbdd7ff3926a2 docs/reference/configuration.md 67d9914f6b43f5eb73fe05b547981737f665489c src/main/python/apache/aurora/config/schema/base.py a466e78f85d980dc11689ab252b8c70e9cfd3d57 src/main/python/apache/aurora/config/thrift.py eb0014422f99fdc8dcea9b0b75b86cdf78cf2dbb src/test/python/apache/aurora/client/cli/test_inspect.py ecefc1845350242fe5113e5c85c4e3db09937ec1 src/test/python/apache/aurora/config/test_thrift.py 76d0ad681689e7aa03401ecea2d2b3123268d7da Diff: https://reviews.apache.org/r/64341/diff/2/ Changes: https://reviews.apache.org/r/64341/diff/1-2/ Testing (updated) --- Test with `.aurora` file as: ``` pkg_path = '/vagrant/hello.py' install = Process( name='fetch package', cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) runner = Process( name='hello world', cmdline='python -u hello.py') hello_task = SequentialTask( processes=[install, runner], resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) jobs = [ Service(cluster='devcluster', role='www-data', environment='devel', name='metadata_test', task=hello_task, metadata=[Metadata(key='state', value='CA'), Metadata(key='stat', value='NY')] ) ] ``` Metadata information can be found in **job configuration** of UI as: ``` METADATA state: CA stat: NY ``` Thanks, Jing Chen
Re: Review Request 64341: Add metadata field to Job object in DSL
> On Dec. 5, 2017, 6:30 p.m., Bill Farner wrote: > > src/test/python/apache/aurora/config/test_thrift.py > > Lines 236-239 (patched) > > <https://reviews.apache.org/r/64341/diff/1/?file=1909032#file1909032line236> > > > > Please replace this with a direct equality comparison to the expected > > set. I am not sure direct equality comparison with a expected set is possible. I have a look at _Metadata_ implementation in **ttypes.py**, there is no hash method being provided, two sets will not be regarded as identical even though they have same content - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64341/#review192889 --- On Dec. 5, 2017, 3:14 p.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/64341/ > --- > > (Updated Dec. 5, 2017, 3:14 p.m.) > > > Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner. > > > Bugs: AURORA-1898 > https://issues.apache.org/jira/browse/AURORA-1898 > > > Repository: aurora > > > Description > --- > > Add metadata field to Job object in DSL > > > Diffs > - > > RELEASE-NOTES.md 54dcc75ef4f4fbf52c4dc60ec0dcbdd7ff3926a2 > docs/reference/configuration.md 67d9914f6b43f5eb73fe05b547981737f665489c > src/main/python/apache/aurora/config/schema/base.py > a466e78f85d980dc11689ab252b8c70e9cfd3d57 > src/main/python/apache/aurora/config/thrift.py > eb0014422f99fdc8dcea9b0b75b86cdf78cf2dbb > src/test/python/apache/aurora/config/test_thrift.py > 76d0ad681689e7aa03401ecea2d2b3123268d7da > > > Diff: https://reviews.apache.org/r/64341/diff/1/ > > > Testing > --- > > Test with `.aurora` file as: > ``` > pkg_path = '/vagrant/hello.py' > > install = Process( > name='fetch package', > cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) > > runner = Process( > name='hello world', > cmdline='python -u hello.py') > > hello_task = SequentialTask( > name='hello task', > processes=[install, runner], > resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) > > jobs = [ > Service(cluster='devcluster', > role='www-data', > environment='devel', > name='hello_test', > task=hello_task, > metadata={'tag':'metadata test', 'version': 1} > ) > ] > ``` > > Metadata information can be found in job configuration of UI as: > ``` > METADATA > version: 1 > tag: metadata test > ``` > > > Thanks, > > Jing Chen > >
Review Request 64341: Add metadata field to Job object in DSL
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64341/ --- Review request for Aurora, David McLaughlin, Stephan Erb, and Bill Farner. Bugs: AURORA-1898 https://issues.apache.org/jira/browse/AURORA-1898 Repository: aurora Description --- Add metadata field to Job object in DSL Diffs - RELEASE-NOTES.md 54dcc75ef4f4fbf52c4dc60ec0dcbdd7ff3926a2 docs/reference/configuration.md 67d9914f6b43f5eb73fe05b547981737f665489c src/main/python/apache/aurora/config/schema/base.py a466e78f85d980dc11689ab252b8c70e9cfd3d57 src/main/python/apache/aurora/config/thrift.py eb0014422f99fdc8dcea9b0b75b86cdf78cf2dbb src/test/python/apache/aurora/config/test_thrift.py 76d0ad681689e7aa03401ecea2d2b3123268d7da Diff: https://reviews.apache.org/r/64341/diff/1/ Testing --- Test with `.aurora` file as: ``` pkg_path = '/vagrant/hello.py' install = Process( name='fetch package', cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) runner = Process( name='hello world', cmdline='python -u hello.py') hello_task = SequentialTask( name='hello task', processes=[install, runner], resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) jobs = [ Service(cluster='devcluster', role='www-data', environment='devel', name='hello_test', task=hello_task, metadata={'tag':'metadata test', 'version': 1} ) ] ``` Metadata information can be found in job configuration of UI as: ``` METADATA version: 1 tag: metadata test ``` Thanks, Jing Chen
Review Request 64284: Expose thrift workload stats on pruneTasks() invocations
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/64284/ --- Review request for Aurora, Mehrdad Nurolahzade and Stephan Erb. Bugs: AURORA-1901 https://issues.apache.org/jira/browse/AURORA-1901 Repository: aurora Description --- Expose thrift workload stats on pruneTasks() invocations Diffs - src/main/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterface.java a519b0728b02b5ccdaaa5566566aae4691f07ffa src/test/java/org/apache/aurora/scheduler/thrift/SchedulerThriftInterfaceTest.java 883738446a093e464630d06f1241832129165fcc Diff: https://reviews.apache.org/r/64284/diff/1/ Testing --- curl 192.168.33.7:8081/vars | grep thrift_workload_pruneTasks % Total% Received % Xferd Average Speed TimeTime Time Current Dload Upload Total SpentLeft Speed 100 260530 260530 0 4074k 0 --:--:-- --:--:-- --:--:-- 4240k thrift_workload_pruneTasks 0 Thanks, Jing Chen
Re: Review Request 61249: Cron timezone should be configurable per job
7;, cron_collision_policy='KILL_EXISTING', time_zone='Europe/Berlin', task = Task( name="cron_task", processes=[Process(name="cron_process", cmdline="echo 'cron job in berlin timezone runs'; date")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` The _next cron run_ is scheduled at `08/04 08:00:00 LOCAL, 08/04 15:00:00 UTC` 2. Configuration file 2, whose time zone is **missing**: ``` jobs = [ Job( cluster = 'devcluster', role = 'www-data', environment = 'devel', name = 'cron_job_no_tz', cron_schedule = '* 17 * * FRI', cron_collision_policy='KILL_EXISTING', task = Task( name="cron_task", processes=[Process(name="cron_process", cmdline="echo 'cron job no tz runs'; date")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` The _next cron run_ is scheduled at `08/04 10:00:00 LOCAL, 08/04 17:00:00 UTC` Thanks, Jing Chen
Re: Review Request 61249: Cron timezone should be configurable per job
> On Aug. 2, 2017, 8:38 p.m., David McLaughlin wrote: > > src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java > > Lines 266 (patched) > > <https://reviews.apache.org/r/61249/diff/1/?file=1785805#file1785805line266> > > > > This will be null for all crons scheduled before this patch landed, and > > below it will default to "GMT", possibly conflicting with the scheduler > > default. > > > > So you can either do a null check here and call predictNextRun when > > it's null, or do a storage backfill and add timezone to all existing crons. > > Jing Chen wrote: > In ConfigurationManager::validateAndPopulate, a cron job's timezone is > set to the scheduler's timezone if its timezone is not set. > So I assume every cron job's timezone must be populated since they are > all validated via ConfigurationManager. > > Please correct me if i was wrong > > David McLaughlin wrote: > Ah, you're right. I thought validateAndPopulate was only called when the > config was sent to the API. But it's also called implicitly via the > SanitizedCronJob class. > > Stephan Erb wrote: > Where is the spot this is called? The way I am reading it at the moment, > `getJobs` is directly calling into `Storage.Util.fetchCronJobs(storage)` and > that would be un-sanitized. > > David McLaughlin wrote: > Here: > https://github.com/apache/aurora/blob/master/src/main/java/org/apache/aurora/scheduler/cron/quartz/AuroraCronJob.java#L171 > > David McLaughlin wrote: > Actually, you are correct in that the data returned to the user and > visible in the UI will be incorrect. > > I left my comment in the wrong place - the problem I was worried about > was on the cron scheduling side. Which should be fixed by the sanitization. > > Stephan Erb wrote: > Jing, I believe this issue still stands. Do you think you can address it? > > (Sorry for the epic delay in answering!) Just wondering if it is good idea to sanitize crons when they are fetched from storage. - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61249/#review182031 --- On Aug. 5, 2017, 12:31 p.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61249/ > --- > > (Updated Aug. 5, 2017, 12:31 p.m.) > > > Review request for Aurora, Joshua Cohen and Stephan Erb. > > > Bugs: AURORA-1348 > https://issues.apache.org/jira/browse/AURORA-1348 > > > Repository: aurora > > > Description > --- > > Cron timezone should be configurable per job > > > Diffs > - > > RELEASE-NOTES.md fd2618fee8ef05091849e177bd99fc321548be90 > api/src/main/thrift/org/apache/aurora/gen/api.thrift > 3749531b5412d7ca217736aa85eed8e6606225ad > docs/features/cron-jobs.md 3a3edeabe23553f12074a853c2567b2b62748226 > docs/reference/configuration.md bc7e098bde5da1442f7ce1b0f793fa4495e21d9a > src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java > 186fa1b3a4780c0536fb486d50a33133258110cd > > src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java > 754fde0fdc976b673d78ae15d8ccd8c85b792373 > src/main/java/org/apache/aurora/scheduler/cron/CronPredictor.java > 8957b3a04e681c653884fdc9134d74ae766677ae > > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java > 90399f22c50ba3218fa3f392c3dbf24e6ea524a1 > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronLifecycle.java > f18e1dcd6d34d6376d267359d2aaedff1d0c0202 > > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImpl.java > e937667dc73c432dc0934a18f28274913ec5640d > > src/main/java/org/apache/aurora/scheduler/storage/db/views/DbJobConfiguration.java > 40a5013b62d459d9c766c765f9e536f7042757e1 > src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java > bba1161a48738e19f10fcf72395f8d70b481ed13 > src/main/python/apache/aurora/client/cli/jobs.py > b79ae56bee0e5692cacf1e66f4a4126b06aaffdc > src/main/python/apache/aurora/config/schema/base.py > 18ce826363009e1cc0beac5cce4edf42610d487e > src/main/python/apache/aurora/config/thrift.py > bedf8cd6641e1b1a930602791b758d584af4891c > src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml > 1434f45ca0bc188bf
Re: Review Request 61249: Cron timezone should be configurable per job
environment = 'devel', name = 'cron_job_berlin', cron_schedule = '* 17 * * FRI', cron_collision_policy='KILL_EXISTING', time_zone='Europe/Berlin', task = Task( name="cron_task", processes=[Process(name="cron_process", cmdline="echo 'cron job in berlin timezone runs'; date")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` The _next cron run_ is scheduled at `08/04 08:00:00 LOCAL, 08/04 15:00:00 UTC` 2. Configuration file 2, whose time zone is **missing**: ``` jobs = [ Job( cluster = 'devcluster', role = 'www-data', environment = 'devel', name = 'cron_job_no_tz', cron_schedule = '* 17 * * FRI', cron_collision_policy='KILL_EXISTING', task = Task( name="cron_task", processes=[Process(name="cron_process", cmdline="echo 'cron job no tz runs'; date")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` The _next cron run_ is scheduled at `08/04 10:00:00 LOCAL, 08/04 17:00:00 UTC` Thanks, Jing Chen
Re: Review Request 61249: Cron timezone should be configurable per job
> On Aug. 2, 2017, 8:38 p.m., David McLaughlin wrote: > > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImpl.java > > Line 41 (original), 41 (patched) > > <https://reviews.apache.org/r/61249/diff/1/?file=1785803#file1785803line41> > > > > Is this called anymore? most likely no, I will double check and remove the method once I could confirm > On Aug. 2, 2017, 8:38 p.m., David McLaughlin wrote: > > src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java > > Lines 266 (patched) > > <https://reviews.apache.org/r/61249/diff/1/?file=1785805#file1785805line266> > > > > This will be null for all crons scheduled before this patch landed, and > > below it will default to "GMT", possibly conflicting with the scheduler > > default. > > > > So you can either do a null check here and call predictNextRun when > > it's null, or do a storage backfill and add timezone to all existing crons. In ConfigurationManager::validateAndPopulate, a cron job's timezone is set to the scheduler's timezone if its timezone is not set. So I assume every cron job's timezone must be populated since they are all validated via ConfigurationManager. Please correct me if i was wrong - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/61249/#review182031 --- On July 31, 2017, 10:29 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/61249/ > --- > > (Updated July 31, 2017, 10:29 a.m.) > > > Review request for Aurora, Joshua Cohen and Stephan Erb. > > > Bugs: AURORA-1348 > https://issues.apache.org/jira/browse/AURORA-1348 > > > Repository: aurora > > > Description > --- > > Cron timezone should be configurable per job > > > Diffs > - > > api/src/main/thrift/org/apache/aurora/gen/api.thrift > 3749531b5412d7ca217736aa85eed8e6606225ad > src/main/java/org/apache/aurora/scheduler/base/TaskTestUtil.java > 186fa1b3a4780c0536fb486d50a33133258110cd > > src/main/java/org/apache/aurora/scheduler/configuration/ConfigurationManager.java > 754fde0fdc976b673d78ae15d8ccd8c85b792373 > src/main/java/org/apache/aurora/scheduler/cron/CronPredictor.java > 8957b3a04e681c653884fdc9134d74ae766677ae > > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImpl.java > 90399f22c50ba3218fa3f392c3dbf24e6ea524a1 > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronLifecycle.java > f18e1dcd6d34d6376d267359d2aaedff1d0c0202 > > src/main/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImpl.java > e937667dc73c432dc0934a18f28274913ec5640d > > src/main/java/org/apache/aurora/scheduler/storage/db/views/DbJobConfiguration.java > 40a5013b62d459d9c766c765f9e536f7042757e1 > src/main/java/org/apache/aurora/scheduler/thrift/ReadOnlySchedulerImpl.java > bba1161a48738e19f10fcf72395f8d70b481ed13 > src/main/python/apache/aurora/config/schema/base.py > 18ce826363009e1cc0beac5cce4edf42610d487e > src/main/python/apache/aurora/config/thrift.py > bedf8cd6641e1b1a930602791b758d584af4891c > src/main/resources/org/apache/aurora/scheduler/storage/db/CronJobMapper.xml > 1434f45ca0bc188bfb0f2ef3c25fbcd102a3ccb1 > src/main/resources/org/apache/aurora/scheduler/storage/db/schema.sql > 7a86f47af67adb3e488381d30ddf424549deefbc > > src/test/java/org/apache/aurora/scheduler/configuration/ConfigurationManagerTest.java > 50d7499f4332a3feb0e2301cb707f2cea6bb2e98 > src/test/java/org/apache/aurora/scheduler/cron/quartz/CronIT.java > 8556253fc11f6027316871eb9dc66d8627a77fe6 > > src/test/java/org/apache/aurora/scheduler/cron/quartz/CronJobManagerImplTest.java > 81440f5689f9538a4c7a9e6700bf03ca89c4ba85 > > src/test/java/org/apache/aurora/scheduler/cron/quartz/CronPredictorImplTest.java > 0f8c9839000e2e379a75fd9d10a7f22fc01f3b18 > src/test/java/org/apache/aurora/scheduler/cron/quartz/QuartzTestUtil.java > 3c5ecd698557cafdf8eeacdc472589a379018896 > > src/test/java/org/apache/aurora/scheduler/storage/AbstractCronJobStoreTest.java > 3ec6e2bf28db20f1cda26dd9862af83d479ec4bf > > src/test/java/org/apache/aurora/scheduler/storage/log/SnapshotStoreImplIT.java > 7f41430975d46440a404ac58395582f66fd902d4 > src/test/java/org/apache/aurora/scheduler/thrift/Fixtures.java > 43e32eede27bbf26363a3fd1ca34f
Review Request 61249: Cron timezone should be configurable per job
;, cron_collision_policy='KILL_EXISTING', task = Task( name="cron_task", processes=[Process(name="cron_process", cmdline="echo 'cron job no tz runs'; date")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` The _next cron run_ is scheduled at `08/04 10:00:00 LOCAL, 08/04 17:00:00 UTC` Thanks, Jing Chen
Re: Review Request 54624: Expose stats on ZooKeeper connection state
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/ --- (Updated Jan. 4, 2017, 9:33 a.m.) Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, and Zameer Manji. Changes --- Injecting `StatsProvider` via provides methods Bugs: AURORA-1838 https://issues.apache.org/jira/browse/AURORA-1838 Repository: aurora Description --- Expose stats on ZooKeeper connection state Diffs (updated) - src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java 999a542796858dcfe9e31601c47239189043fd52 src/test/java/org/apache/aurora/scheduler/discovery/AbstractDiscoveryModuleTest.java d90192b10250b36c3b97055f87ff297fdf2a7dad Diff: https://reviews.apache.org/r/54624/diff/ Testing --- http://192.168.33.7:8081/vars ``` zk_connection_state_CONNECTED 1 zk_connection_state_CONNECTED_counter 1 zk_connection_state_LOST 0 zk_connection_state_LOST_counter 0 zk_connection_state_READ_ONLY 0 zk_connection_state_READ_ONLY_counter 0 zk_connection_state_RECONNECTED 0 zk_connection_state_RECONNECTED_counter 0 zk_connection_state_SUSPENDED 0 zk_connection_state_SUSPENDED_counter 0 ``` * zk_connection_state_STATE shows 1 if STATE is current connection state, otherwise 0. * zk_connection_state_STATE_counter represents occurence times of the STATE since scheduler state Thanks, Jing Chen
Re: Review Request 54624: Expose stats on ZooKeeper connection state
> On Dec. 27, 2016, 5:33 p.m., Joshua Cohen wrote: > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java, > > lines 68-77 > > <https://reviews.apache.org/r/54624/diff/3/?file=1589427#file1589427line68> > > > > It's prefereble to inject the `StatsProvider` instance and use that to > > create the counters in the constructor rather than to reference > > `Stats.STATS_PROVIDER` directly (if we ever bound another instance of > > `StatsProvider` in `AppModule` this class would not be aware of that, nor > > would we be able to use a mock stats provider for tests if we so desired. is it a good idea to inject `StatsProvider` to the constructor in this case? Would it be better if `StatsProvide` were injected into provides methods and initializes counters? - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/#review160175 ------- On Dec. 20, 2016, 9:33 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54624/ > --- > > (Updated Dec. 20, 2016, 9:33 a.m.) > > > Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, > and Zameer Manji. > > > Bugs: AURORA-1838 > https://issues.apache.org/jira/browse/AURORA-1838 > > > Repository: aurora > > > Description > --- > > Expose stats on ZooKeeper connection state > > > Diffs > - > > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java > 999a542796858dcfe9e31601c47239189043fd52 > > Diff: https://reviews.apache.org/r/54624/diff/ > > > Testing > --- > > http://192.168.33.7:8081/vars > ``` > zk_connection_state_CONNECTED 1 > zk_connection_state_CONNECTED_counter 1 > zk_connection_state_LOST 0 > zk_connection_state_LOST_counter 0 > zk_connection_state_READ_ONLY 0 > zk_connection_state_READ_ONLY_counter 0 > zk_connection_state_RECONNECTED 0 > zk_connection_state_RECONNECTED_counter 0 > zk_connection_state_SUSPENDED 0 > zk_connection_state_SUSPENDED_counter 0 > ``` > > * zk_connection_state_STATE shows 1 if STATE is current connection state, > otherwise 0. > * zk_connection_state_STATE_counter represents occurence times of the STATE > since scheduler state > > > Thanks, > > Jing Chen > >
Re: Review Request 54624: Expose stats on ZooKeeper connection state
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/ --- (Updated Dec. 20, 2016, 9:33 a.m.) Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, and Zameer Manji. Changes --- per review feedback, add binary gauge to export current connection state, keep counters to keep track of state appearance times Bugs: AURORA-1838 https://issues.apache.org/jira/browse/AURORA-1838 Repository: aurora Description --- Expose stats on ZooKeeper connection state Diffs (updated) - src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java 999a542796858dcfe9e31601c47239189043fd52 Diff: https://reviews.apache.org/r/54624/diff/ Testing (updated) --- http://192.168.33.7:8081/vars ``` zk_connection_state_CONNECTED 1 zk_connection_state_CONNECTED_counter 1 zk_connection_state_LOST 0 zk_connection_state_LOST_counter 0 zk_connection_state_READ_ONLY 0 zk_connection_state_READ_ONLY_counter 0 zk_connection_state_RECONNECTED 0 zk_connection_state_RECONNECTED_counter 0 zk_connection_state_SUSPENDED 0 zk_connection_state_SUSPENDED_counter 0 ``` * zk_connection_state_STATE shows 1 if STATE is current connection state, otherwise 0. * zk_connection_state_STATE_counter represents occurence times of the STATE since scheduler state Thanks, Jing Chen
Re: Review Request 54624: Expose stats on ZooKeeper connection state
> On Dec. 12, 2016, 10:15 p.m., Mehrdad Nurolahzade wrote: > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java, > > lines 135-151 > > <https://reviews.apache.org/r/54624/diff/2/?file=1581612#file1581612line135> > > > > I would rather prefer binary state (0/1 value) to counter-like stats > > here. See `org.apache.aurora.scheduler.SchedulerLifecycle` as an example. > > Stephan Erb wrote: > Binary state gauges have the disadvantage that they only show the > presence. This would imply we need to scrape `/vars` pretty often in order to > detect ZK connection problems. Counters don't have that limitation. > > Mehrdad Nurolahzade wrote: > I agree. Perhaps I am baised here because we already have a solution for > polling and diagraming stats internally. > So, in your world, how are going to use counters to contemplate current > state? > > David McLaughlin wrote: > We want both. A Gauge stat for current connection state and absolute > counters for the events (as they are now). AFAIC, it is easier to know how many state chagnes happened from a counter, can you tell me what we are able to get from the current state. Thanks - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/#review158871 --- On Dec. 12, 2016, 1:32 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54624/ > --- > > (Updated Dec. 12, 2016, 1:32 a.m.) > > > Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, > and Zameer Manji. > > > Bugs: AURORA-1838 > https://issues.apache.org/jira/browse/AURORA-1838 > > > Repository: aurora > > > Description > --- > > Expose stats on ZooKeeper connection state > > > Diffs > - > > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java > 999a542796858dcfe9e31601c47239189043fd52 > > Diff: https://reviews.apache.org/r/54624/diff/ > > > Testing > --- > > http://192.168.33.7:8081/vars > ``` > zk_connection_state_connected 1 > zk_connection_state_lost 0 > zk_connection_state_readonly 0 > zk_connection_state_reconnected 0 > zk_connection_state_suspended 0 > zk_connection_state_unknown 0 > ``` > > > Thanks, > > Jing Chen > >
Re: Review Request 54624: Expose stats on ZooKeeper connection state
> On Dec. 10, 2016, 8:14 p.m., Joshua Cohen wrote: > > I think the idea behind the ticket was to track these as stats, not just > > into the log. btw, I am not pretty sure if `AtomicLong`s here should be `static` or not - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/#review158773 --- On Dec. 12, 2016, 1:32 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/54624/ > --- > > (Updated Dec. 12, 2016, 1:32 a.m.) > > > Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, > and Zameer Manji. > > > Bugs: AURORA-1838 > https://issues.apache.org/jira/browse/AURORA-1838 > > > Repository: aurora > > > Description > --- > > Expose stats on ZooKeeper connection state > > > Diffs > - > > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java > 999a542796858dcfe9e31601c47239189043fd52 > > Diff: https://reviews.apache.org/r/54624/diff/ > > > Testing > --- > > http://192.168.33.7:8081/vars > ``` > zk_connection_state_connected 1 > zk_connection_state_lost 0 > zk_connection_state_readonly 0 > zk_connection_state_reconnected 0 > zk_connection_state_suspended 0 > zk_connection_state_unknown 0 > ``` > > > Thanks, > > Jing Chen > >
Re: Review Request 54624: Expose stats on ZooKeeper connection state
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/ --- (Updated Dec. 12, 2016, 1:32 a.m.) Review request for Aurora, Joshua Cohen, Mehrdad Nurolahzade, Stephan Erb, and Zameer Manji. Bugs: AURORA-1838 https://issues.apache.org/jira/browse/AURORA-1838 Repository: aurora Description --- Expose stats on ZooKeeper connection state Diffs - src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java 999a542796858dcfe9e31601c47239189043fd52 Diff: https://reviews.apache.org/r/54624/diff/ Testing (updated) --- http://192.168.33.7:8081/vars ``` zk_connection_state_connected 1 zk_connection_state_lost 0 zk_connection_state_readonly 0 zk_connection_state_reconnected 0 zk_connection_state_suspended 0 zk_connection_state_unknown 0 ``` Thanks, Jing Chen
Re: Review Request 54624: Expose stats on ZooKeeper connection state
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/ --- (Updated Dec. 12, 2016, 1:28 a.m.) Review request for Aurora, Mehrdad Nurolahzade, Stephan Erb, and Zameer Manji. Changes --- expose stats on connection state changes Bugs: AURORA-1838 https://issues.apache.org/jira/browse/AURORA-1838 Repository: aurora Description --- Expose stats on ZooKeeper connection state Diffs (updated) - src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java 999a542796858dcfe9e31601c47239189043fd52 Diff: https://reviews.apache.org/r/54624/diff/ Testing --- State Change is logged into aurora-scheduler.log: ``` I1210 10:44:37.973 [main-EventThread, ConnectionStateManager] State change: CONNECTED ``` Thanks, Jing Chen
Review Request 54624: Expose stats on ZooKeeper connection state
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/54624/ --- Review request for Aurora, Mehrdad Nurolahzade, Stephan Erb, and Zameer Manji. Bugs: AURORA-1838 https://issues.apache.org/jira/browse/AURORA-1838 Repository: aurora Description --- Expose stats on ZooKeeper connection state Diffs - src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java 999a542796858dcfe9e31601c47239189043fd52 Diff: https://reviews.apache.org/r/54624/diff/ Testing --- State Change is logged into aurora-scheduler.log: ``` I1210 10:44:37.973 [main-EventThread, ConnectionStateManager] State change: CONNECTED ``` Thanks, Jing Chen
Re: Review Request 53114: aurora job inspect should have a --write-json option
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/ --- (Updated Nov. 11, 2016, 10:13 a.m.) Review request for Aurora, Joshua Cohen, Stephan Erb, Brian Wickman, and Zameer Manji. Bugs: AURORA-1504 https://issues.apache.org/jira/browse/AURORA-1504 Repository: aurora Description --- aurora job inspect should have a --write-json option Diffs (updated) - src/main/python/apache/aurora/client/cli/jobs.py 87fbf13f8e5955b30436f8d871b548275f009893 src/test/python/apache/aurora/client/cli/test_inspect.py fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea Diff: https://reviews.apache.org/r/53114/diff/ Testing --- vagrant@aurora:~$ aurora job inspect devcluster/www-data/devel/cron_hello_jing /vagrant/cron_hello_jing.aurora --write-json | tee /tmp/test.json ``` {"environment": "devel", "health_check_config": {"initial_interval_secs": 15.0, "health_checker": {"http": {"expected_response_code": 0, "endpoint": "/health", "expected_response": "ok"}}, "interval_secs": 10.0, "timeout_secs": 1.0, "max_consecutive_failures": 0}, "cluster": "devcluster", "cron_schedule": "*/10 * * * *", "service": false, "update_config": {"wait_for_batch_completion": false, "batch_size": 1, "watch_secs": 45, "rollback_on_failure": true, "max_per_shard_failures": 0, "max_total_failures": 0}, "name": "cron_hello_jing", "max_task_failures": 1, "cron_collision_policy": "CANCEL_NEW", "enable_hooks": false, "instances": 1, "task": {"processes": [{"daemon": false, "name": "hello_jing", "ephemeral": false, "max_failures": 1, "min_duration": 5, "cmdline": "echo 'cron hello jing'", "final": false}], "name": "cron_hello_jing", "finalization_wait": 30, "max_failures": 1, "max_concurrency": 0, "resources": {"gpu": 0, "disk": 8388608, "ram": 1048576, "cpu": 1.0}, "constraints": [ ]}, "production": false, "role": "www-data", "tier": "preemptible", "lifecycle": {"http": {"graceful_shutdown_endpoint": "/quitquitquit", "port": "health", "shutdown_endpoint": "/abortabortabort"}}, "priority": 0} ``` vagrant@aurora:~$ aurora job inspect devcluster/www-data/devel/cron_hello_jing /tmp/test.json --read-json ``` Job level information name: 'cron_hello_jing' role: 'www-data' cluster:'devcluster' instances: '1' cron: schedule: '*/10 * * * *' policy: 'CANCEL_NEW' service:False production: False Task level information name: 'cron_hello_jing' Process 'hello_jing': cmdline: echo 'cron hello jing' ``` Thanks, Jing Chen
Re: Review Request 53114: aurora job inspect should have a --write-json option
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/ --- (Updated Nov. 11, 2016, 9:34 a.m.) Review request for Aurora, Joshua Cohen, Stephan Erb, Brian Wickman, and Zameer Manji. Bugs: AURORA-1504 https://issues.apache.org/jira/browse/AURORA-1504 Repository: aurora Description --- aurora job inspect should have a --write-json option Diffs (updated) - src/main/python/apache/aurora/client/cli/jobs.py 87fbf13f8e5955b30436f8d871b548275f009893 src/test/python/apache/aurora/client/cli/test_inspect.py fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea Diff: https://reviews.apache.org/r/53114/diff/ Testing (updated) --- vagrant@aurora:~$ aurora job inspect devcluster/www-data/devel/cron_hello_jing /vagrant/cron_hello_jing.aurora --write-json | tee /tmp/test.json ``` {"environment": "devel", "health_check_config": {"initial_interval_secs": 15.0, "health_checker": {"http": {"expected_response_code": 0, "endpoint": "/health", "expected_response": "ok"}}, "interval_secs": 10.0, "timeout_secs": 1.0, "max_consecutive_failures": 0}, "cluster": "devcluster", "cron_schedule": "*/10 * * * *", "service": false, "update_config": {"wait_for_batch_completion": false, "batch_size": 1, "watch_secs": 45, "rollback_on_failure": true, "max_per_shard_failures": 0, "max_total_failures": 0}, "name": "cron_hello_jing", "max_task_failures": 1, "cron_collision_policy": "CANCEL_NEW", "enable_hooks": false, "instances": 1, "task": {"processes": [{"daemon": false, "name": "hello_jing", "ephemeral": false, "max_failures": 1, "min_duration": 5, "cmdline": "echo 'cron hello jing'", "final": false}], "name": "cron_hello_jing", "finalization_wait": 30, "max_failures": 1, "max_concurrency": 0, "resources": {"gpu": 0, "disk": 8388608, "ram": 1048576, "cpu": 1.0}, "constraints": [ ]}, "production": false, "role": "www-data", "tier": "preemptible", "lifecycle": {"http": {"graceful_shutdown_endpoint": "/quitquitquit", "port": "health", "shutdown_endpoint": "/abortabortabort"}}, "priority": 0} ``` vagrant@aurora:~$ aurora job inspect devcluster/www-data/devel/cron_hello_jing /tmp/test.json --read-json ``` Job level information name: 'cron_hello_jing' role: 'www-data' cluster:'devcluster' instances: '1' cron: schedule: '*/10 * * * *' policy: 'CANCEL_NEW' service:False production: False Task level information name: 'cron_hello_jing' Process 'hello_jing': cmdline: echo 'cron hello jing' ``` Thanks, Jing Chen
Re: Review Request 53114: aurora job inspect should have a --write-json option
> On Nov. 4, 2016, 2:22 p.m., Stephan Erb wrote: > > src/main/python/apache/aurora/client/cli/jobs.py, lines 291-337 > > <https://reviews.apache.org/r/53114/diff/2/?file=1544805#file1544805line291> > > > > Having a manual json assembly here is brittle. Whenever we change > > something in the pystachio schema we have to make sure we update this place > > as well. This is asking for trouble down the road. > > > > I would propose to replace this with a single call of the existing > > pystachio json serialization method instead: > > > > ``` > > config.raw().json_dumps() > > ``` > > > > A file written using this is then also suitable for ingestion via our > > `--read-json` methods. For example: > > > > ``` > > aurora job inspect --read-json devcluster/www-data/prod/hello > > hello_world.json > > ``` should we do anything on non-json rendering side? Per your concerns, changes in the pystachio schema might also force us to update the non-json rendering. - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/#review154902 --- On Oct. 25, 2016, 2:14 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53114/ > --- > > (Updated Oct. 25, 2016, 2:14 a.m.) > > > Review request for Aurora, Joshua Cohen, Brian Wickman, and Zameer Manji. > > > Bugs: AURORA-1504 > https://issues.apache.org/jira/browse/AURORA-1504 > > > Repository: aurora > > > Description > --- > > aurora job inspect should have a --write-json option > > > Diffs > - > > src/main/python/apache/aurora/client/cli/jobs.py > 87fbf13f8e5955b30436f8d871b548275f009893 > src/test/python/apache/aurora/client/cli/test_inspect.py > fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea > > Diff: https://reviews.apache.org/r/53114/diff/ > > > Testing > --- > > * For configuration for a job as: > ``` > pkg_path = '/vagrant/hello.py' > > install = Process( > name='fetch package', > cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) > > runner = Process( > name='hello jing', > ephemeral = True, > cmdline='python -u hello.py') > > hello_task = SequentialTask( > name='hello task', > processes=[install, runner], > resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) > > jobs = [ > Service(cluster='devcluster', > role='www-data', > environment='devel', > name='hello_jing', > task=hello_task, > constraints = { > 'host':'limit:2', > 'rack':'limit:1' > }) > ] > ``` > command 'aurora job inspect devcluster/www-data/devel/hello_jing > /vagrant/hello.aurora --write-json' returns: > ``` > { > "job": { > "name": "hello_jing", > "role": "www-data", > "cluster": "devcluster", > "instances": "1", > "constraints": [ > { > "host": "limit:2" > }, > { > "rack": "limit:1" > } > ], > "service": true, > "production": false > }, > "task": { > "name": "hello task", > "constraints": [ > "fetch package < hello jing" > ], > "processes": [ > { > "name": "fetch package", > "daemon": false, > "ephemeral": false, > "final": false, > "cmdline": [ > "cp /vagrant/hello.py . && chmod u+x hello.py" > ] > }, > { > "name": "hello jing", > "daemon": false, > "ephemeral": true, > "final": false, > "cmdline": [ > "python -u hello.py" > ] > } > ] > } > } > > ``` > > * For configuration for a cron job as: >
Re: Review Request 52665: Populate curator latches with scheduler information
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52665/ --- (Updated Oct. 29, 2016, 10:05 a.m.) Review request for Aurora, Joshua Cohen, John Sirois, and Zameer Manji. Changes --- Move `LeaderLatch` creation out of `CuratorSingletonService` constructor to `lead()` in which we can access hostname of a contender as the id for `LeaderLatch`. The hostname should be enough to identify a contender. Bugs: AURORA-1785 https://issues.apache.org/jira/browse/AURORA-1785 Repository: aurora Description --- Populate curator latches with scheduler information Diffs (updated) - src/main/java/org/apache/aurora/scheduler/discovery/CuratorSingletonService.java 4040067a5301f71f35b6719b42fdf0ecbe282404 Diff: https://reviews.apache.org/r/52665/diff/ Testing (updated) --- verified in vagrant (CONNECTED) /> get aurora/scheduler/member_000173 {"serviceEndpoint":{"host":"aurora.local","port":8081},"additionalEndpoints":{"http":{"host":"aurora.local","port":8081}},"status":"ALIVE"} (CONNECTED) /> get aurora/scheduler/_c_fe00a931-df92-4041-97db-9ef27a56e264-latch-000172 aurora.local Thanks, Jing Chen
Re: Review Request 53114: aurora job inspect should have a --write-json option
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/ --- (Updated Oct. 25, 2016, 2:14 a.m.) Review request for Aurora, Joshua Cohen, Brian Wickman, and Zameer Manji. Bugs: AURORA-1504 https://issues.apache.org/jira/browse/AURORA-1504 Repository: aurora Description --- aurora job inspect should have a --write-json option Diffs - src/main/python/apache/aurora/client/cli/jobs.py 87fbf13f8e5955b30436f8d871b548275f009893 src/test/python/apache/aurora/client/cli/test_inspect.py fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea Diff: https://reviews.apache.org/r/53114/diff/ Testing (updated) --- * For configuration for a job as: ``` pkg_path = '/vagrant/hello.py' install = Process( name='fetch package', cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) runner = Process( name='hello jing', ephemeral = True, cmdline='python -u hello.py') hello_task = SequentialTask( name='hello task', processes=[install, runner], resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) jobs = [ Service(cluster='devcluster', role='www-data', environment='devel', name='hello_jing', task=hello_task, constraints = { 'host':'limit:2', 'rack':'limit:1' }) ] ``` command 'aurora job inspect devcluster/www-data/devel/hello_jing /vagrant/hello.aurora --write-json' returns: ``` { "job": { "name": "hello_jing", "role": "www-data", "cluster": "devcluster", "instances": "1", "constraints": [ { "host": "limit:2" }, { "rack": "limit:1" } ], "service": true, "production": false }, "task": { "name": "hello task", "constraints": [ "fetch package < hello jing" ], "processes": [ { "name": "fetch package", "daemon": false, "ephemeral": false, "final": false, "cmdline": [ "cp /vagrant/hello.py . && chmod u+x hello.py" ] }, { "name": "hello jing", "daemon": false, "ephemeral": true, "final": false, "cmdline": [ "python -u hello.py" ] } ] } } ``` * For configuration for a cron job as: ``` jobs = [ Job( cluster = 'devcluster', role = 'www-data', environment = 'devel', name = 'cron_hello_jing', cron_schedule = '*/10 * * * *', cron_collision_policy='CANCEL_NEW', task = Task( name="cron_hello_jing", processes=[Process(name="hello_jing", cmdline="echo 'cron hello jing'")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` command aurora job inspect devcluster/www-data/devel/cron_hello_jing /vagrant/cron_hello_world.aurora --write-json returns: ``` { "job": { "name": "cron_hello_jing", "role": "www-data", "cluster": "devcluster", "instances": "1", "cron": { "schedule": "*/10 * * * *", "policy": "CANCEL_NEW" }, "service": false, "production": false }, "task": { "name": "cron_hello_jing", "processes": [ { "name": "hello_jing", "daemon": false, "ephemeral": false, "final": false, "cmdline": [ "echo 'cron hello jing'" ] } ] } } ``` Thanks, Jing Chen
Re: Review Request 53114: aurora job inspect should have a --write-json option
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/ --- (Updated Oct. 25, 2016, 2:06 a.m.) Review request for Aurora, Joshua Cohen, Brian Wickman, and Zameer Manji. Bugs: AURORA-1504 https://issues.apache.org/jira/browse/AURORA-1504 Repository: aurora Description --- aurora job inspect should have a --write-json option Diffs (updated) - src/main/python/apache/aurora/client/cli/jobs.py 87fbf13f8e5955b30436f8d871b548275f009893 src/test/python/apache/aurora/client/cli/test_inspect.py fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea Diff: https://reviews.apache.org/r/53114/diff/ Testing --- * For configuration for a job as: ``` pkg_path = '/vagrant/hello.py' install = Process( name='fetch package', cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) runner = Process( name='hello jing', ephemeral = True, cmdline='python -u hello.py') hello_task = SequentialTask( name='hello task', processes=[install, runner], resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) jobs = [ Service(cluster='devcluster', role='www-data', environment='devel', name='hello_jing', task=hello_task, constraints = { 'host':'limit:2', 'rack':'limit:1' }) ] ``` command 'aurora job inspect devcluster/www-data/devel/hello_jing /vagrant/hello.aurora --write-json' returns: ``` { "job": { "name": "hello_jing", "role": "www-data", "contact": "", "cluster": "devcluster", "instances": "1", "constraints": [ { "host": "limit:2" }, { "rack": "limit:1" } ], "service": true, "production": false }, "task": { "name": "hello task", "constraints": [ "fetch package < hello jing" ], "processes": [ { "name": "fetch package", "daemon": false, "ephemeral": false, "final": false, "cmdline": [ "cp /vagrant/hello.py . && chmod u+x hello.py" ] }, { "name": "hello jing", "daemon": false, "ephemeral": true, "final": false, "cmdline": [ "python -u hello.py" ] } ] } } ``` * For configuration for a cron job as: ``` jobs = [ Job( cluster = 'devcluster', role = 'www-data', environment = 'devel', name = 'cron_hello_jing', cron_schedule = '*/10 * * * *', cron_collision_policy='CANCEL_NEW', task = Task( name="cron_hello_jing", processes=[Process(name="hello_jing", cmdline="echo 'cron hello jing'")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` command aurora job inspect devcluster/www-data/devel/cron_hello_jing /vagrant/cron_hello_world.aurora --write-json returns: ``` { "job": { "name": "cron_hello_jing", "role": "www-data", "contact": "", "cluster": "devcluster", "instances": "1", "cron": { "schedule": "*/10 * * * *", "policy": "CANCEL_NEW" }, "service": false, "production": false }, "task": { "name": "cron_hello_jing", "processes": [ { "name": "hello_jing", "daemon": false, "ephemeral": false, "final": false, "cmdline": [ "echo 'cron hello jing'" ] } ] } } ``` Thanks, Jing Chen
Re: Review Request 53114: aurora job inspect should have a --write-json option
> On Oct. 24, 2016, 4:04 p.m., Joshua Cohen wrote: > > Thanks once again for the patch! > > > > If I'm missing something and the changes on the non-json rendering side are > > necessary, can you also ensure that the output there is identical > > before/after your patch (i.e. run `aurora job inspect` on master and this > > branch and diff the output)? > > Jing Chen wrote: > the only difference for non-json rendering is contraint. I use 2 spaces > to indent the containts content. For example, > > beofre: > ``` > "constraints": > "fetch package < hello world" > ``` > now: > ``` > "constraints": > "fetch package < hello world" > ``` > If the indentation is not necessary for contraints, I could remove it. The non-json output renders the contact even if no contact given as ``, will fix that on both json and non-json rendering - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/#review153696 --- On Oct. 23, 2016, 12:37 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53114/ > --- > > (Updated Oct. 23, 2016, 12:37 a.m.) > > > Review request for Aurora, Joshua Cohen, Brian Wickman, and Zameer Manji. > > > Bugs: AURORA-1504 > https://issues.apache.org/jira/browse/AURORA-1504 > > > Repository: aurora > > > Description > --- > > aurora job inspect should have a --write-json option > > > Diffs > - > > src/main/python/apache/aurora/client/cli/jobs.py > 87fbf13f8e5955b30436f8d871b548275f009893 > src/test/python/apache/aurora/client/cli/test_inspect.py > fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea > > Diff: https://reviews.apache.org/r/53114/diff/ > > > Testing > --- > > * For configuration for a job as: > ``` > pkg_path = '/vagrant/hello.py' > > install = Process( > name='fetch package', > cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) > > runner = Process( > name='hello jing', > ephemeral = True, > cmdline='python -u hello.py') > > hello_task = SequentialTask( > name='hello task', > processes=[install, runner], > resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) > > jobs = [ > Service(cluster='devcluster', > role='www-data', > environment='devel', > name='hello_jing', > task=hello_task, > constraints = { > 'host':'limit:2', > 'rack':'limit:1' > }) > ] > ``` > command 'aurora job inspect devcluster/www-data/devel/hello_jing > /vagrant/hello.aurora --write-json' returns: > ``` > { > "job": { > "name": "hello_jing", > "role": "www-data", > "contact": "", > "cluster": "devcluster", > "instances": "1", > "constraints": [ > { > "host": "limit:2" > }, > { > "rack": "limit:1" > } > ], > "service": true, > "production": false > }, > "task": { > "name": "hello task", > "constraints": [ > "fetch package < hello jing" > ], > "processes": [ > { > "name": "fetch package", > "daemon": false, > "ephemeral": false, > "final": false, > "cmdline": [ > "cp /vagrant/hello.py . && chmod u+x hello.py" > ] > }, > { > "name": "hello jing", > "daemon": false, > "ephemeral": true, > "final": false, > "cmdline": [ > "python -u hello.py" > ] > } > ] > } > } > > ``` > > * For configuration for a cron job as: > ``` > jobs = [ > Job( > cluster = 'devcluster', >
Re: Review Request 53114: aurora job inspect should have a --write-json option
> On Oct. 24, 2016, 4:04 p.m., Joshua Cohen wrote: > > Thanks once again for the patch! > > > > If I'm missing something and the changes on the non-json rendering side are > > necessary, can you also ensure that the output there is identical > > before/after your patch (i.e. run `aurora job inspect` on master and this > > branch and diff the output)? the only difference for non-json rendering is contraint. I use 2 spaces to indent the containts content. For example, beofre: ``` "constraints": "fetch package < hello world" ``` now: ``` "constraints": "fetch package < hello world" ``` If the indentation is not necessary for contraints, I could remove it. > On Oct. 24, 2016, 4:04 p.m., Joshua Cohen wrote: > > src/main/python/apache/aurora/client/cli/jobs.py, line 238 > > <https://reviews.apache.org/r/53114/diff/1/?file=1543714#file1543714line238> > > > > Was the refactoring here to write to build up an array and then return > > the joined string necessary? It seems like this method is not called in the > > write json path? Can we just leave this as is and continue to directly use > > `context.print_out` to render (which has the slight benefit of handling > > indentation if the value is multi-line)? It is the refactoring here of human readable configuration output, the reason for the method is only for readability, when the option is enabled, the output will be in json format, otherwise, it prints out as before by _reder_config_pretty_. Once we enable --write-json option, I don't think it is necessary to print out those information since json output provides the same information, so the method won't be called, only json format is printed. One more question here is where to put those _context.print_outs_, should I put in separated method _render_config_pretty_ or _execute_? Thanks Joshua. - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/#review153696 --- On Oct. 23, 2016, 12:37 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53114/ > --- > > (Updated Oct. 23, 2016, 12:37 a.m.) > > > Review request for Aurora, Joshua Cohen, Brian Wickman, and Zameer Manji. > > > Bugs: AURORA-1504 > https://issues.apache.org/jira/browse/AURORA-1504 > > > Repository: aurora > > > Description > --- > > aurora job inspect should have a --write-json option > > > Diffs > - > > src/main/python/apache/aurora/client/cli/jobs.py > 87fbf13f8e5955b30436f8d871b548275f009893 > src/test/python/apache/aurora/client/cli/test_inspect.py > fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea > > Diff: https://reviews.apache.org/r/53114/diff/ > > > Testing > --- > > * For configuration for a job as: > ``` > pkg_path = '/vagrant/hello.py' > > install = Process( > name='fetch package', > cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) > > runner = Process( > name='hello jing', > ephemeral = True, > cmdline='python -u hello.py') > > hello_task = SequentialTask( > name='hello task', > processes=[install, runner], > resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) > > jobs = [ > Service(cluster='devcluster', > role='www-data', > environment='devel', > name='hello_jing', > task=hello_task, > constraints = { > 'host':'limit:2', > 'rack':'limit:1' > }) > ] > ``` > command 'aurora job inspect devcluster/www-data/devel/hello_jing > /vagrant/hello.aurora --write-json' returns: > ``` > { > "job": { > "name": "hello_jing", > "role": "www-data", > "contact": "", > "cluster": "devcluster", > "instances": "1", > "constraints": [ > { > "host": "limit:2" > }, > { > "rack": "limit:1" > } > ], > "service": true, > "production": false > }, > "task": { > "
Review Request 53114: aurora job inspect should have a --write-json option
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53114/ --- Review request for Aurora, Joshua Cohen, Brian Wickman, and Zameer Manji. Bugs: AURORA-1504 https://issues.apache.org/jira/browse/AURORA-1504 Repository: aurora Description --- aurora job inspect should have a --write-json option Diffs - src/main/python/apache/aurora/client/cli/jobs.py 87fbf13f8e5955b30436f8d871b548275f009893 src/test/python/apache/aurora/client/cli/test_inspect.py fedc16b3d4e9fb7d6f5f0dc34ad7a1837e34baea Diff: https://reviews.apache.org/r/53114/diff/ Testing --- * For configuration for a job as: ``` pkg_path = '/vagrant/hello.py' install = Process( name='fetch package', cmdline='cp {} . && chmod u+x hello.py'.format(pkg_path)) runner = Process( name='hello jing', ephemeral = True, cmdline='python -u hello.py') hello_task = SequentialTask( name='hello task', processes=[install, runner], resources=Resources(cpu=1, ram=1*MB, disk=8*MB)) jobs = [ Service(cluster='devcluster', role='www-data', environment='devel', name='hello_jing', task=hello_task, constraints = { 'host':'limit:2', 'rack':'limit:1' }) ] ``` command 'aurora job inspect devcluster/www-data/devel/hello_jing /vagrant/hello.aurora --write-json' returns: ``` { "job": { "name": "hello_jing", "role": "www-data", "contact": "", "cluster": "devcluster", "instances": "1", "constraints": [ { "host": "limit:2" }, { "rack": "limit:1" } ], "service": true, "production": false }, "task": { "name": "hello task", "constraints": [ "fetch package < hello jing" ], "processes": [ { "name": "fetch package", "daemon": false, "ephemeral": false, "final": false, "cmdline": [ "cp /vagrant/hello.py . && chmod u+x hello.py" ] }, { "name": "hello jing", "daemon": false, "ephemeral": true, "final": false, "cmdline": [ "python -u hello.py" ] } ] } } ``` * For configuration for a cron job as: ``` jobs = [ Job( cluster = 'devcluster', role = 'www-data', environment = 'devel', name = 'cron_hello_jing', cron_schedule = '*/10 * * * *', cron_collision_policy='CANCEL_NEW', task = Task( name="cron_hello_jing", processes=[Process(name="hello_jing", cmdline="echo 'cron hello jing'")], resources=Resources(cpu=1, ram=1*MB, disk=8*MB) ) ) ] ``` command aurora job inspect devcluster/www-data/devel/cron_hello_jing /vagrant/cron_hello_world.aurora --write-json returns: ``` { "job": { "name": "cron_hello_jing", "role": "www-data", "contact": "", "cluster": "devcluster", "instances": "1", "cron": { "schedule": "*/10 * * * *", "policy": "CANCEL_NEW" }, "service": false, "production": false }, "task": { "name": "cron_hello_jing", "processes": [ { "name": "hello_jing", "daemon": false, "ephemeral": false, "final": false, "cmdline": [ "echo 'cron hello jing'" ] } ] } } ``` Thanks, Jing Chen
Re: Review Request 52665: Populate curator latches with scheduler information
> On Oct. 10, 2016, 12:49 a.m., John Sirois wrote: > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorSingletonService.java, > > line 142 > > <https://reviews.apache.org/r/52665/diff/1/?file=1528674#file1528674line142> > > > > This was in my example code, but I don't think its the right answer for > > the contents of the node; ie: Zameer was gunning for a unique ip such that > > he could cat the contents of the `*-latch-*` nodes and from that learn > > which machines were contending for leadership. As things stand, that > > execercise might net the set `{127.0.0.1, 127.0.0.1, 127.0.0.1}` - not > > terribly helpful! > > > > You may just need to enumerate all non-loopback addresses, like ~so: > > ``` > > $ cat Address.java > > import java.net.InetAddress; > > import java.net.InterfaceAddress; > > import java.net.NetworkInterface; > > import java.util.Enumeration; > > > > public class Address { > > public static void main(String[] args) throws Exception { > > for (Enumeration interfaces = > > NetworkInterface.getNetworkInterfaces(); > > interfaces.hasMoreElements();) { > > NetworkInterface networkInterface = interfaces.nextElement(); > > if (!networkInterface.isLoopback()) { > > System.out.printf("Enumerating addresses of interface %s:%n", > > networkInterface.getName()); > > for (InterfaceAddress address: > > networkInterface.getInterfaceAddresses()) { > > InetAddress inetAddress = address.getAddress(); > > System.out.printf("\t%s: %s%n", > > inetAddress.getCanonicalHostName(), inetAddress.getHostAddress()); > > } > > } > > } > > } > > } > > $ javac Address.java > > $ java -cp . Address > > Enumerating addresses of interface vboxnet0: > > fe80:0:0:0:800:27ff:fe00:0%vboxnet0: > > fe80:0:0:0:800:27ff:fe00:0%vboxnet0 > > 192.168.33.1: 192.168.33.1 > > Enumerating addresses of interface docker0: > > 172.17.0.1: 172.17.0.1 > > Enumerating addresses of interface wlp3s0: > > fe80:0:0:0:183:9e44:9c10:%wlp3s0: > > fe80:0:0:0:183:9e44:9c10:%wlp3s0 > > 10.0.3.132: 10.0.3.132 > > ``` > > > > I'm not sure of a more foolproof way pre-serverset-join to get useful > > addresses regardless of machine setup. Joshua and Zameer likely have better > > ideas. > > Zameer Manji wrote: > I commented on the ticket, that I think it would be best if the latches > just had the ServerSet information. If we did that, we would avoid these > issues. > > John Sirois wrote: > That may be slightly easier said than done since election preceeds > joining (its a singleton set). > > Zameer Manji wrote: > Hmm, I thought we could make the bytes from the `Advertiser` class go > into the `LeaderLatch` consturctor? > > Jing Chen wrote: > Zameer, is it possible to get the bytes from the **Advertise** into the > **LeaderLatch**? Per my understanding, those bytes are generated in > _advertise()_ after a leader is selected. Latches are created before the > election, those bytes are not ready yet during the latches creation. John's > code might be a solution because it reveals the reacheable ip address of the > contenders. > > Zameer Manji wrote: > You could extract out the logic in `serializeAdvertisement` to another > class and method and use it to get the same bytes that the Advertiser class. _serializeAdvertisement_ has **endpoint** and **additionalEndpoints** as input from _lead_ method, but latches knows nothing about it during the election - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52665/#review151949 --- On Oct. 9, 2016, 8:43 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52665/ > --- > > (Updated Oct. 9, 2016, 8:43 a.m.) > > > Review request for Aurora, Joshua Cohen, John Sirois, and Zameer Manji. > > > Bugs: AURORA-1785 > https://issues.apache.org/jira/browse/AURORA-1785 > > > Repository: aurora > > > Description
Re: Review Request 52665: Populate curator latches with scheduler information
> On Oct. 10, 2016, 12:49 a.m., John Sirois wrote: > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorSingletonService.java, > > line 142 > > <https://reviews.apache.org/r/52665/diff/1/?file=1528674#file1528674line142> > > > > This was in my example code, but I don't think its the right answer for > > the contents of the node; ie: Zameer was gunning for a unique ip such that > > he could cat the contents of the `*-latch-*` nodes and from that learn > > which machines were contending for leadership. As things stand, that > > execercise might net the set `{127.0.0.1, 127.0.0.1, 127.0.0.1}` - not > > terribly helpful! > > > > You may just need to enumerate all non-loopback addresses, like ~so: > > ``` > > $ cat Address.java > > import java.net.InetAddress; > > import java.net.InterfaceAddress; > > import java.net.NetworkInterface; > > import java.util.Enumeration; > > > > public class Address { > > public static void main(String[] args) throws Exception { > > for (Enumeration interfaces = > > NetworkInterface.getNetworkInterfaces(); > > interfaces.hasMoreElements();) { > > NetworkInterface networkInterface = interfaces.nextElement(); > > if (!networkInterface.isLoopback()) { > > System.out.printf("Enumerating addresses of interface %s:%n", > > networkInterface.getName()); > > for (InterfaceAddress address: > > networkInterface.getInterfaceAddresses()) { > > InetAddress inetAddress = address.getAddress(); > > System.out.printf("\t%s: %s%n", > > inetAddress.getCanonicalHostName(), inetAddress.getHostAddress()); > > } > > } > > } > > } > > } > > $ javac Address.java > > $ java -cp . Address > > Enumerating addresses of interface vboxnet0: > > fe80:0:0:0:800:27ff:fe00:0%vboxnet0: > > fe80:0:0:0:800:27ff:fe00:0%vboxnet0 > > 192.168.33.1: 192.168.33.1 > > Enumerating addresses of interface docker0: > > 172.17.0.1: 172.17.0.1 > > Enumerating addresses of interface wlp3s0: > > fe80:0:0:0:183:9e44:9c10:%wlp3s0: > > fe80:0:0:0:183:9e44:9c10:%wlp3s0 > > 10.0.3.132: 10.0.3.132 > > ``` > > > > I'm not sure of a more foolproof way pre-serverset-join to get useful > > addresses regardless of machine setup. Joshua and Zameer likely have better > > ideas. > > Zameer Manji wrote: > I commented on the ticket, that I think it would be best if the latches > just had the ServerSet information. If we did that, we would avoid these > issues. > > John Sirois wrote: > That may be slightly easier said than done since election preceeds > joining (its a singleton set). > > Zameer Manji wrote: > Hmm, I thought we could make the bytes from the `Advertiser` class go > into the `LeaderLatch` consturctor? Zameer, is it possible to get the bytes from the **Advertise** into the **LeaderLatch**? Per my understanding, those bytes are generated in _advertise()_ after a leader is selected. Latches are created before the election, those bytes are not ready yet during the latches creation. John's code might be a solution because it reveals the reacheable ip address of the contenders. - Jing --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52665/#review151949 --- On Oct. 9, 2016, 8:43 a.m., Jing Chen wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52665/ > --- > > (Updated Oct. 9, 2016, 8:43 a.m.) > > > Review request for Aurora, Joshua Cohen, John Sirois, and Zameer Manji. > > > Bugs: AURORA-1785 > https://issues.apache.org/jira/browse/AURORA-1785 > > > Repository: aurora > > > Description > --- > > Populate curator latches with scheduler information > > > Diffs > - > > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java > e690d1448a900484ee9723bb8cd47def1a6db31d > > src/main/java/org/apache/aurora/scheduler/discovery/CuratorSingletonService.java > 4040067a5301f71f35b6719b42fdf0ecbe282404 > > Diff: https://reviews.apache.org/r/52665/diff/ > > > Testing > --- > > verified in vagrant > > (CONNECTED) /> get /aurora/scheduler/member_51 > {"serviceEndpoint":{"host":"aurora.local","port":8081},"additionalEndpoints":{"http":{"host":"aurora.local","port":8081}},"status":"ALIVE"} > (CONNECTED) /> get > /aurora/scheduler/_c_5c25d2a0-7070-4fde-a50d-78364e763e9c-latch-50 > 127.0.0.1 > > > Thanks, > > Jing Chen > >
Review Request 52665: Populate curator latches with scheduler information
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52665/ --- Review request for Aurora, Joshua Cohen, John Sirois, and Zameer Manji. Bugs: AURORA-1785 https://issues.apache.org/jira/browse/AURORA-1785 Repository: aurora Description --- Populate curator latches with scheduler information Diffs - src/main/java/org/apache/aurora/scheduler/discovery/CuratorServiceDiscoveryModule.java e690d1448a900484ee9723bb8cd47def1a6db31d src/main/java/org/apache/aurora/scheduler/discovery/CuratorSingletonService.java 4040067a5301f71f35b6719b42fdf0ecbe282404 Diff: https://reviews.apache.org/r/52665/diff/ Testing --- verified in vagrant (CONNECTED) /> get /aurora/scheduler/member_51 {"serviceEndpoint":{"host":"aurora.local","port":8081},"additionalEndpoints":{"http":{"host":"aurora.local","port":8081}},"status":"ALIVE"} (CONNECTED) /> get /aurora/scheduler/_c_5c25d2a0-7070-4fde-a50d-78364e763e9c-latch-50 127.0.0.1 Thanks, Jing Chen
Re: Review Request 52508: Order job update events and instance events by ID rather than timestamp
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52508/ --- (Updated Oct. 4, 2016, 8:51 a.m.) Review request for Aurora, Joshua Cohen and Bill Farner. Bugs: AURORA-655 https://issues.apache.org/jira/browse/AURORA-655 Repository: aurora Description --- Order job update events and instance events by ID rather than timestamp Diffs - src/main/resources/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.xml d91c650a46f28b2bd832ce0615bc29e0a87721bc Diff: https://reviews.apache.org/r/52508/diff/ Testing --- Thanks, Jing Chen
Review Request 52508: Order job update events and instance events by ID rather than timestamp
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52508/ --- Review request for Aurora. Repository: aurora Description --- Order job update events and instance events by ID rather than timestamp Diffs - src/main/resources/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.xml d91c650a46f28b2bd832ce0615bc29e0a87721bc Diff: https://reviews.apache.org/r/52508/diff/ Testing --- Thanks, Jing Chen
Review Request 52506: Order job update events and instance events by ID rather than timestamp
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52506/ --- Review request for Aurora, Joshua Cohen and Bill Farner. Bugs: AURORA-655 https://issues.apache.org/jira/browse/AURORA-655 Repository: aurora Description --- Order job update events and instance events by ID rather than timestamp Diffs - Diff: https://reviews.apache.org/r/52506/diff/ Testing --- Thanks, Jing Chen
Re: Review Request 52300: Running task ssh without an instance should pick a random instance
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52300/ --- (Updated Sept. 30, 2016, 3:19 p.m.) Review request for Aurora, Joshua Cohen and Bill Farner. Changes --- fix a typo Bugs: AURORA-1110 https://issues.apache.org/jira/browse/AURORA-1110 Repository: aurora Description --- Running task ssh without an instance should pick the random instance Diffs (updated) - src/main/python/apache/aurora/client/cli/options.py 1245ff15a69a4b4347672f7b556985521e813a00 src/main/python/apache/aurora/client/cli/task.py a8a4edcfda8d879fcc4401bb8f5223de3ee5376d src/test/python/apache/aurora/client/cli/test_task.py d2233b67b37f8b34fae62372aa5d95e0a2e827b5 Diff: https://reviews.apache.org/r/52300/diff/ Testing --- verified in vagrant Thanks, JING CHEN
Re: Review Request 52300: Running task ssh without an instance should pick a random instance
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52300/ --- (Updated Sept. 30, 2016, 10:08 a.m.) Review request for Aurora, Joshua Cohen and Bill Farner. Changes --- add a helper function to create _CommandOption_, add a new test case where getTaskStatus is called when instanceId is not specified in the query Bugs: AURORA-1110 https://issues.apache.org/jira/browse/AURORA-1110 Repository: aurora Description --- Running task ssh without an instance should pick the random instance Diffs (updated) - src/main/python/apache/aurora/client/cli/options.py 1245ff15a69a4b4347672f7b556985521e813a00 src/main/python/apache/aurora/client/cli/task.py a8a4edcfda8d879fcc4401bb8f5223de3ee5376d src/test/python/apache/aurora/client/cli/test_task.py d2233b67b37f8b34fae62372aa5d95e0a2e827b5 Diff: https://reviews.apache.org/r/52300/diff/ Testing --- verified in vagrant Thanks, JING CHEN
Re: Review Request 52300: Running task ssh without an instance should pick a random instance
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52300/ --- (Updated Sept. 29, 2016, 5:30 a.m.) Review request for Aurora, Joshua Cohen and Bill Farner. Changes --- When command option is provided, instance must be specified Bugs: AURORA-1110 https://issues.apache.org/jira/browse/AURORA-1110 Repository: aurora Description (updated) --- Running task ssh without an instance should pick the random instance Diffs (updated) - src/main/python/apache/aurora/client/cli/options.py 1245ff15a69a4b4347672f7b556985521e813a00 src/main/python/apache/aurora/client/cli/task.py a8a4edcfda8d879fcc4401bb8f5223de3ee5376d src/test/python/apache/aurora/client/cli/test_task.py d2233b67b37f8b34fae62372aa5d95e0a2e827b5 Diff: https://reviews.apache.org/r/52300/diff/ Testing --- verified in vagrant Thanks, JING CHEN
Re: Review Request 52300: Running task ssh without an instance should pick a random instance
> On Sept. 27, 2016, 11:11 a.m., Joshua Cohen wrote: > > src/main/python/apache/aurora/client/cli/options.py, lines 118-120 > > <https://reviews.apache.org/r/52300/diff/1/?file=1510842#file1510842line118> > > > > Changing this here means that all commands that previously required an > > instance key rather than a job key will now work without one. A quick > > glance at the code indicates that this change will also affect the `aurora > > job add` command, which requires specifying an instance to use as a > > template for adding more task instances to the job. I'm not sure we want to > > make that change as part of this review, there's value in being explicit > > when adding task instances versus picking a random one to act as a template. > > > > How about changing `SshCommand` to specify `INSTANCES_SPEC_ARGUMENT` > > instead of `TASK_INSTANCE_ARGUMENT` which already allows for an optional > > instance spec? thanks Josh, your suggestion makes sense, I will change it asap > On Sept. 27, 2016, 11:11 a.m., Joshua Cohen wrote: > > src/main/python/apache/aurora/client/cli/task.py, line 121 > > <https://reviews.apache.org/r/52300/diff/1/?file=1510843#file1510843line121> > > > > Do you think we should require an instance a the command was specified? > > I'm concerned about the scenario where running the command has a side > > effect on the instance. For example, if you were to run `aurora task ssh > > cluster/role/env/job --command=touch .healthchecksnooze`, after this > > change, that would disable health checks on (from the user's perspective) > > an unknown instance. For the command option, as far as i know, if a instance is not speficed, the __largest__ instance will be returned and connected to, which means the command will execute on the greaetest instace. However, in this case, at least we shoule let user know which instance they perform on. And I am also wondering if it is easy for user to find out the greatest instance given that there are multiple instance. I agree with you that it requires explicit instance from user when command option is specified. Otherwise, we have to come up with a idea to make users know the target instance. Let me know if you have addtional suggestion. Thasnks. - JING --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52300/#review150540 --- On Sept. 27, 2016, 10:44 a.m., JING CHEN wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/52300/ > --- > > (Updated Sept. 27, 2016, 10:44 a.m.) > > > Review request for Aurora, Joshua Cohen and Bill Farner. > > > Bugs: AURORA-1110 > https://issues.apache.org/jira/browse/AURORA-1110 > > > Repository: aurora > > > Description > --- > > Running task ssh without an instance should pick the greatest instance > > > Diffs > - > > src/main/python/apache/aurora/client/cli/options.py > 1245ff15a69a4b4347672f7b556985521e813a00 > src/main/python/apache/aurora/client/cli/task.py > a8a4edcfda8d879fcc4401bb8f5223de3ee5376d > src/test/python/apache/aurora/client/cli/test_options.py > f2aae5741611909d5a1700cb4da70dec313e00da > > Diff: https://reviews.apache.org/r/52300/diff/ > > > Testing > --- > > verified in vagrant > > > Thanks, > > JING CHEN > >
Review Request 52300: Running task ssh without an instance should pick a random instance
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52300/ --- Review request for Aurora, Joshua Cohen and Bill Farner. Bugs: AURORA-1110 https://issues.apache.org/jira/browse/AURORA-1110 Repository: aurora Description --- Running task ssh without an instance should pick the greatest instance Diffs - src/main/python/apache/aurora/client/cli/options.py 1245ff15a69a4b4347672f7b556985521e813a00 src/main/python/apache/aurora/client/cli/task.py a8a4edcfda8d879fcc4401bb8f5223de3ee5376d src/test/python/apache/aurora/client/cli/test_options.py f2aae5741611909d5a1700cb4da70dec313e00da Diff: https://reviews.apache.org/r/52300/diff/ Testing --- verified in vagrant Thanks, JING CHEN