Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

BMI on Travis for CI #119

Merged
merged 2 commits into from
Jul 5, 2017
Merged

BMI on Travis for CI #119

merged 2 commits into from
Jul 5, 2017

Conversation

chemistry-sourabh
Copy link
Contributor

Refer #117

Sets up 3 docker container instead of one as I was having issues with the former. Works perfectly well with all the test cases I have except the picasso test cases which need to be modified to start and stop picasso and einstein as per @naved001's suggestion. Also works with the state operation test cases in #111

@chemistry-sourabh chemistry-sourabh changed the title Dockerfile for environment (+1 squashed commit) BMI on Travis for CI May 15, 2017
@ravisantoshgudimetla
Copy link
Contributor

ravisantoshgudimetla commented May 16, 2017

Thanks @chemistry-sourabh, this is really awesome. Except for end of file new lines, I don't see much problems with this. But I would recommend this to be tried by @naved001 before we push forward. If not, I can give this a try later this week.

@chemistry-sourabh
Copy link
Contributor Author

chemistry-sourabh commented May 16, 2017

Try what ? the travis check passing is proof that it works! @ravisantoshgudimetla

@ravisantoshgudimetla
Copy link
Contributor

the travis check passing is proof that it works!

Where is the travis run?

@chemistry-sourabh
Copy link
Contributor Author

It runs on Travis ? Check the build log for this Travis build, you will understand better

@naved001
Copy link
Contributor

@ravisantoshgudimetla Here are the travis logs.
https://travis-ci.org/CCI-MOC/ims/builds/232307368#L622

@chemistry-sourabh it's really awesome.

@chemistry-sourabh
Copy link
Contributor Author

Changed to Docker Hub as per long discussion with @ravisantoshgudimetla

@chemistry-sourabh
Copy link
Contributor Author

Fixed new lines also. So please approve if no other issues then we can merge this ASAP

@chemistry-sourabh
Copy link
Contributor Author

Forgot to add coverage and random execution of tests. Will update this PR later

Copy link
Contributor

@naved001 naved001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add some short comments so we know what's going on and why?

.travis.yml Outdated
- sudo docker run -d -v ceph:/etc/ceph -e MON_IP=172.17.0.2 -e CEPH_PUBLIC_NETWORK=172.17.0.0/24 --name ceph ceph/demo
- sleep 30
- sudo docker run -d --name hil chemistrysourabh/hil
- sudo docker pull chemistrysourabh/bmi-ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have generic names here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean the repo names ? Ya that is part of my agenda. I didnt knew docker would use my Docker ID as my repo name. Will change it.

@chemistry-sourabh
Copy link
Contributor Author

@naved001 and @sirushtim added randomness plugin, changed repo to bmis instead of mine, Added comments to yaml also. Waiting on approval for coverage

Copy link
Contributor

@ravisantoshgudimetla ravisantoshgudimetla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chemistry-sourabh
Copy link
Contributor Author

@CCI-MOC/bmi-breakers can I get a second +1, so that we can merge. I'll raise a second PR for coverage.

@naved001 naved001 requested a review from knikolla May 22, 2017 14:39
@naved001
Copy link
Contributor

Hey @knikolla would you have the time to review this PR?

@@ -0,0 +1,33 @@
FROM ubuntu

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this file used anywhere.

Copy link
Contributor Author

@chemistry-sourabh chemistry-sourabh May 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knikolla This is the file is used to build the docker image that is pulled in the yaml file. I'll add a comment on top saying the same.

.travis.yml Outdated
script:
# Run pep8 on all .py files in all subfolders
# ignore E402: module level import not at top of file
- find . -name \*.py -exec pep8 --ignore=E402 {} +

# Run Ceph Container and Wait for some time so that ceph runs
- sudo docker run -d -v ceph:/etc/ceph -e MON_IP=172.17.0.2 -e CEPH_PUBLIC_NETWORK=172.17.0.0/24 --name ceph ceph/demo

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll have a look

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@knikolla as per the build cycle, the pep8 check should go in the script section and running containers should go in before_install section. But it doesnt make sense to run the containers if pep8 failed right ? what do you think ?

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 78ce74c on chemistry-sourabh:Travis into ** on CCI-MOC:dev**.

@ravisantoshgudimetla
Copy link
Contributor

@chemistry-sourabh please refrain from adding changes once approval has been given unless they are related to change requested or else whoever has approved needs to come back and review it again.

@chemistry-sourabh
Copy link
Contributor Author

@ravisantoshgudimetla sorry about that. I am nearly done with this, will let you know when its ready.

@chemistry-sourabh chemistry-sourabh force-pushed the Travis branch 4 times, most recently from ac081ee to 36c1441 Compare May 26, 2017 02:54
@chemistry-sourabh
Copy link
Contributor Author

@knikolla and @ravisantoshgudimetla please have a look. Added coverage also into this PR.

@@ -1,3 +1,5 @@
[![Build Status](https://travis-ci.org/CCI-MOC/ims.svg?branch=dev)](https://travis-ci.org/CCI-MOC/ims)
[![Coverage Status](https://coveralls.io/repos/github/CCI-MOC/ims/badge.svg?branch=dev)](https://coveralls.io/github/CCI-MOC/ims?branch=dev)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess, you need to separate the coverage part out as it is not part of BMI CI. You may be running CI to get coverage report but that wasn't explicitly mentioned in issue. So the steps would be to

  • Update the existing issue to reflect this.
  • Create 2 commits - One for BMI CI , one for coverage part.

@ravisantoshgudimetla
Copy link
Contributor

Overall I am fine with the changes, I will leave it to @knikolla to provide his feedback.

@chemistry-sourabh
Copy link
Contributor Author

@naved001 @pgrosu changed ceph version and also changed OS to centos.

The issue is with HIL, the current production is so old that the Dockerfile I wrote for it doesn't work. Also the docs for it are also not that detailed. @naved001 can you tell me the commit to which you will be upgrading production HIL to ? I'll change the docker script to install that instead.

@naved001
Copy link
Contributor

@chemistry-sourabh The current HIL master is what I'll use to upgrade. So it'll be this commit

@naved001
Copy link
Contributor

@knikolla are your concerns addressed?

@pgrosu
Copy link

pgrosu commented Jun 22, 2017

@chemistry-sourabh Thank you the fixes! I'm assuming the a177944 and 2a588f7 commits will pass with the HIL version that @naved001 recommended? If so, then let's match to what @naved001 is using as his commit for HIL. Over time I prefer we shift to a continuous integration, where the HIL instance to test against is the latest stable release - which will also be the deployed version in BMI-Dev and BMI-Prod.

@naved001 This HIL commit will be the one installed in new BMI-Dev environment @ PRB, right?

@chemistry-sourabh
Copy link
Contributor Author

Updated HIL also and it works!!

chemistry_sourabh added 2 commits June 22, 2017 01:19
Squashed commits:
[639b713] Fixed tgt
[57c9d09] test
[2a588f7] Changed to centos
[a177944] Added ceph tag
[8b29689] CI Final Commit (+1 squashed commit)
Squashed commits:
[50097a9] Commented docker files (+1 squashed commit)
Squashed commits:
[e4c0f50] Added comments (+6 squashed commits)
Squashed commits:
[14e426c] Update images
[876b6bd] Repo change
[2ae8ab0] Added new lines
[314830d] Changed to docker hub
[51c5d61] Added build status
[2faa0b0] Dockerfile for environment (+1 squashed commit)
Squashed commits:
[c338292] Travis
@chemistry-sourabh
Copy link
Contributor Author

@naved001 @pgrosu Updated TGT also and all tests pass.

@pgrosu
Copy link

pgrosu commented Jun 22, 2017

@chemistry-sourabh This is really great news and thank you for making this happen! I still need to review it a little bit, but had not had the chance today - I promise very soon.

Many thanks!
~p

@naved001
Copy link
Contributor

@ravisantoshgudimetla, ping

@naved001 naved001 merged commit 971c7ea into CCI-MOC:dev Jul 5, 2017
@naved001 naved001 mentioned this pull request Jul 5, 2017
@pgrosu
Copy link

pgrosu commented Jul 7, 2017

@naved001 One thing to give you a heads up on, this PR contains hammer as the Ceph client and @djfinn14 and I are going to be testing a scenario soon, which might require this PR to be changed by using jewel as the Ceph client. This is not a scenario that would be easy to figure out if one assumes that Travis is working properly, when it might not.

@chemistry-sourabh
Copy link
Contributor Author

@pgrosu can you describe this scenario a bit more ? I tested BMI with Jewel and with worked fine.

@chemistry-sourabh chemistry-sourabh deleted the Travis branch July 7, 2017 01:04
@naved001
Copy link
Contributor

naved001 commented Jul 7, 2017

@pgrosu

which might require this PR to be changed by using jewel as the Ceph client.

yeah, in that case we'll raise a PR to modify the changes introduced by this.

@pgrosu
Copy link

pgrosu commented Jul 7, 2017

@chemistry-sourabh, @naved001 Jewel would probably work but we need to still test on PRB in the new dev environment, but this PR is using Hammer. When we rbd create using hammer, we noticed that we had to wait 10 seconds before importing the image into BMI, or it would throw an error. We wanted to look more carefully if we can replicate this scenario multiple times consistently. We are in the middle of generalizing the acceptance tests, and perform this test. That is why it is taking us a bit longer, but wanted to ensure we can confirm this scenario.

We did not want this merged yet as a separate on a passed PR could confuse people where the error is coming from, as Travis would also be used to confirm future submitted PRs. Such layered troubleshooting might or might not pass, causing confusion where the issue is coming from.

Basically we need all merged PRs to ensure they pass all tests, of which ours is the final one. So it would be best to wait until we have completed each one properly.

@chemistry-sourabh
Copy link
Contributor Author

@pgrosu interesting! The weird question is why isn't it happening in Travis ?

@pgrosu
Copy link

pgrosu commented Jul 7, 2017

@chemistry-sourabh Because I don't believe we are running that control flow scenario of creating an image first, and then immediately importing it. @djfinn14 started going into the Ceph codebase, but before we drill too deep we wanted to confirm by replicating the scenario. If that is confirmed, then @apoorvemohan's minimum requirements list (#120 (comment)) would need to be updated as well.

@naved001
Copy link
Contributor

naved001 commented Jul 7, 2017

@pgrosu I understand what you are saying. My reason for going ahead and merging this was because this was sitting for too long and would start to rot just like how the install script is right now ( #60 ). We will continue to discover new bugs and patch them as we discover them instead of doing it in open PRs.

And as for the ceph version (hammer vs jewel) we could open up new issue saying that our CI might need to be updated in the future; that way we can keep track of the issues we might have.

If you'd prefer that we unmerge this PR, that's fine by me. You can merge this after you and @djfinn14 figure out the ceph issues.

@chemistry-sourabh
Copy link
Contributor Author

I'll prefer updating it with a future PR. Since we are not experiencing this issue in Travis, this future PR is not time critical.

@ravisantoshgudimetla
Copy link
Contributor

I'd recommend cutting a release before making the changes again. It should be something like:

BMI 0.5 Version supports - TGT XX Version, Ceph YY Version etc. If not, it becomes difficult to manage.

@pgrosu
Copy link

pgrosu commented Jul 7, 2017

Though I understand, an unknown-known can still exist and we are beginning to shift as a group to a systematic analysis approach when testing or coding BMI, which includes PRs. That means analyzing all common scenario combinations, and how BMI handles them. Once the product is released we want to ensure surprises are minimized downstream, as we will need to focus on the redesign.

@naved001
Copy link
Contributor

naved001 commented Jul 7, 2017

@pgrosu so in conclusion, what do we want to do with this PR?

@pgrosu
Copy link

pgrosu commented Jul 7, 2017

@naved001 In conclusion we will run the acceptance test and report back the status, in case we require the change to jewel. So let's keep it as is but in the future, please ask before merging.

@naved001
Copy link
Contributor

naved001 commented Jul 7, 2017

@pgrosu

So let's keep it as is but in the future, please ask before merging.

Sure. The PR had 2 +1s which is why I merged it. In future, for any other PR that you don't want merged, just hit the Request Changes button with a comment.

@chemistry-sourabh
Copy link
Contributor Author

Better would be to add the DO NOT MERGE label

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants