Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Made UTC timezone explicit in common/init.sls. #439

Closed
wants to merge 3 commits into from

Conversation

@ghost
Copy link

ghost commented Jul 15, 2016

Relevant to #303.


This change is Reviewable

@@ -40,6 +40,9 @@ servo:
- shell: /bin/bash
- home: {{ common.servo_home }}
Etc/UTC:

This comment has been minimized.

@aneeshusa

aneeshusa Jul 15, 2016

Member

This can just be UTC.

@aneeshusa
Copy link
Member

aneeshusa commented Jul 15, 2016

Please also add a test for this. I think running the date command and ensuring UTC is in the output will work.

Add a new directory tests/sls/common and put the test in a new file tests/sls/common/timezone.py. Also, please make an empty tests/sls/common/__init__.py file, and update the .travis/dispatch.sh code to run the test on all nodes.

@ghost
Copy link
Author

ghost commented Jul 15, 2016

I've added the test and simplified to just UTC.

@@ -53,6 +53,6 @@ else
# Only run tests against the new configuration
# TODO: don't hard-code this
if [[ "${SALT_NODE_ID}" == "servo-master1" ]]; then
./test.py sls.buildbot.master sls.homu sls.nginx
./test.py sls.buildbot.master sls.common.timezone sls.homu sls.nginx

This comment has been minimized.

@aneeshusa

aneeshusa Jul 15, 2016

Member

Two things:

  • this can be just sls.common, all of the test files in that dir will get run automatically.
  • we want to run the common tests on all nodes, not just servo-master1, so that should happen outside the conditional.


def run():
command = "date | grep -v UTC"

This comment has been minimized.

@aneeshusa

aneeshusa Jul 15, 2016

Member

Instead of using pipes and an extra grep process, let's just look for UTC in the output of the date command inside Python.

stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
shell=True)

This comment has been minimized.

@aneeshusa

aneeshusa Jul 15, 2016

Member

Please remove shell=True, it can cause security problems (and also spawns an extra process).

@KiChjang
Copy link
Member

KiChjang commented Aug 1, 2016

@RowanEB Are you still planning on finishing this up?

@charlesvdv
Copy link
Contributor

charlesvdv commented Dec 29, 2016

@aneeshusa @KiChjang I'm interested in continuing the work of @RowanEB if that's ok for you ? (as he doesn't respond in a long time)

@aneeshusa
Copy link
Member

aneeshusa commented Dec 29, 2016

@charlesvdv please go ahead!

@aneeshusa aneeshusa mentioned this pull request Dec 29, 2016
@KiChjang KiChjang closed this Dec 30, 2016
@charlesvdv charlesvdv mentioned this pull request Dec 30, 2016
bors-servo added a commit that referenced this pull request Jan 7, 2017
Use UTC timezone

Fix the issue #303 and follow up of #439 PR.

I'm not sure about the spot to put the ```sls.common``` tests.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/569)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.