Skip to content

Upgrade InfluxDB storage to InfluxDB 0.9 - #800

Closed
mnuessler wants to merge 7 commits into
google:masterfrom
egym-playground:influx09
Closed

mnuessler wants to merge 7 commits into
google:masterfrom
egym-playground:influx09

Conversation

@mnuessler

Copy link
Copy Markdown
Contributor
  • Fix InfluxDB v0.9 support #743
  • Update InfluxDB client dependency to version 0.9.1-rc1.
  • Rewrite InfluxDB storage for new InfluxDB API data structures.
  • Store each measurement separately instead of storing all measurements
    in a single big "table" with many columns/fields.
  • Use tags add metadata to points, such as the container name. Tags are
    a new feature in InfluxDB 0.9.

@googlebot

Copy link
Copy Markdown
Collaborator

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed, please reply here (e.g. I signed it!) and we'll verify. Thanks.


  • If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check your existing CLA data and verify that your email is set on your git commits.
  • If you signed the CLA as a corporation, please let us know the company's name.

@cadvisorJenkinsBot

Copy link
Copy Markdown

Can one of the admins verify this patch?

@mnuessler

Copy link
Copy Markdown
Contributor Author

Not sure why the CI build failed. I can't reproduce the problem locally. Looks like dependency is missing?

@vmarmol

vmarmol commented Jul 8, 2015

Copy link
Copy Markdown
Contributor

Hmmm the diff is so bit GitHub is choking on it :( can we split the PR into two? Let's try to get the Godeps in first and then the actual changes.

@mnuessler

Copy link
Copy Markdown
Contributor Author

Ok, I split the commit.

@benfb

benfb commented Jul 14, 2015

Copy link
Copy Markdown

Any updates on this?

@mnuessler

Copy link
Copy Markdown
Contributor Author

@vmarmol Any feedback on this PR so far? :)

@mikedanese

Copy link
Copy Markdown
Contributor

@mnuessler The godep changes broke the build.

godep go test -v -race -test.short github.com/google/cadvisor/...
utils/cloudinfo/gce.go:20:2: cannot find package "github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata" in any of:
    /home/travis/.gimme/versions/go1.4.linux.amd64/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata (from $GOROOT)
    /home/travis/gopath/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata (from $GOPATH)
    /home/travis/gopath/src/github.com/GoogleCloudPlatform/gcloud-golang/compute/metadata
storage/bigquery/client/example/example.go:22:2: cannot find package "github.com/SeanDolphin/bqschema" in any of:
    /home/travis/.gimme/versions/go1.4.linux.amd64/src/github.com/SeanDolphin/bqschema (from $GOROOT)
    /home/travis/gopath/src/github.com/google/cadvisor/Godeps/_workspace/src/github.com/SeanDolphin/bqschema (from $GOPATH)
    /home/travis/gopath/src/github.com/SeanDolphin/bqschema
utils/fs/mockfs/mockfs.go:21:2: cannot find package "code.google.com/p/gomock/gomock" in any of:
    /home/travis/.gimme/versions/go1.4.linux.amd64/src/code.google.com/p/gomock/gomock (from $GOROOT)
    /home/travis/gopath/src/github.com/google/cadvisor/Godeps/_workspace/src/code.google.com/p/gomock/gomock (from $GOPATH)
    /home/travis/gopath/src/code.google.com/p/gomock/gomock

@mnuessler

Copy link
Copy Markdown
Contributor Author

Can someone with more experience in godep please give me a hint on how to fix that? I'm kind of stuck here...

@mnuessler

Copy link
Copy Markdown
Contributor Author

I finally managed to fix the broken dependencies. Please have a look at this PR, thank you.

Comment thread Godeps/Godeps.json Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should not be removed

@mikedanese

Copy link
Copy Markdown
Contributor

How are you updating godeps? Can you explain your process?

@mnuessler

Copy link
Copy Markdown
Contributor Author

@mikedanese I have fixed the Godeps.json according to your comments.

I tried several ways of updating godeps, but none seem to work as I expected. Maybe you could point me to the correct way.

Actually I just need to upgrade the package github.com/influxdb/influxdb/client to the latest release (v0.9.1 or at least anything > v0.9.0). Starting off with a clean GOPATH, I tried the following steps:

  • Fetch cadvisor via go get github.com/google/cadvisor.
  • Restore dependencies in GOPATH with godep restore. (Not sure if this is actually necessary.)
  • Use git to pull my cadvisor branch and switch to it.
  • Update the influxdb package in the GOPATH: go get -u github.com/influxdb/influxdb
  • Now when trying to update the godeps with godeps save or godeps save ./... I get an error like such as:
godep: github.com/influxdb/influxdb/influxql: revision is 8b3219e74fcc3843a6f4901bdf00e905642b6bd6, want 3284662b350688b651359f9124928856071bd3f5
  • When I do godep save github.com/influxdb/influxdb/client or ``godep save github.com/influxdb/influxdb` then godeps are updated, but a lot of dependencies also get deleted which caused the CI build to fail.

The only way I could get it to work with the CI was committing the added godeps but ignoring the deletions. It worked locally because the missing dependencies were still in the GOPATH. Any idea what I am doing wrong here?

@SlashmanX

Copy link
Copy Markdown

Any progress on getting this merged?

@mnuessler

Copy link
Copy Markdown
Contributor Author

Any comments on this? It's been a month already since I opened this PR...

@rjnagal

rjnagal commented Aug 11, 2015

Copy link
Copy Markdown
Contributor

IIRC, after merging this, we end up dropping support for older influxdb formats. Is that right?
We have quite a few users at the older version. @vishh do you think we need to support both versions for a while, or is it okay to drop the old one?

@cadvisorJenkinsBot

Copy link
Copy Markdown

Yes. I do think we will have to support both versions ideally.

On Tue, Aug 11, 2015 at 8:18 AM, Rohit Jnagal [email protected]
wrote:

IIRC, after merging this, we end up dropping support for older influxdb
formats. Is that right?
We have quite a few users at the older version. @vishh
https://github.com/vishh do you think we need to support both versions
for a while, or is it okay to drop the old one?

—
Reply to this email directly or view it on GitHub
#800 (comment).

You received this message because you are subscribed to the Google Groups
"cadvisor jenkins bot" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/cadvisor-jenkins-bot/google/cadvisor/pull/800/c129926752%40github.com
https://groups.google.com/a/google.com/d/msgid/cadvisor-jenkins-bot/google/cadvisor/pull/800/c129926752%40github.com?utm_medium=email&utm_source=footer
.

@rjnagal

rjnagal commented Aug 24, 2015

Copy link
Copy Markdown
Contributor

Discussed offline. It's fine to drop the older version support.

I took another shot at reviewing this. I can't make sure if we need all these dependencies (soo many!).
The storage driver changes look okay though.

I'll setup influxdb 0.9 and give it another try. Thanks for your patience!

@peternavr

Copy link
Copy Markdown

Any update? I'd love to push this into prod, CAdvisor is one of the last reasons we haven't pushed Influx 0.9. We've begun looking into telegraf.

@rjnagal

rjnagal commented Aug 28, 2015

Copy link
Copy Markdown
Contributor

@vishh Do you want to try this out? I am fire-fighting this week 😭

@vishh

vishh commented Aug 28, 2015

Copy link
Copy Markdown
Contributor

Sure. Will review soon.

@hectorj2f

Copy link
Copy Markdown

@vishh Do we have any news on this ?

@selvik

selvik commented Sep 17, 2015

Copy link
Copy Markdown

Looking forward to this feature getting in. Thanks!

@vishh

vishh commented Sep 17, 2015

Copy link
Copy Markdown
Contributor

@mnuessler: I'm not able to review this patch using github. Can you remove the godep changes temporarily? Once the review is complete, you can add it back.

@mnuessler

Copy link
Copy Markdown
Contributor Author

Thanks for the info. I will update the PR for InfluxDB 0.9.5. So we can rid of the extra dependencies now and still refer to a regular release.

@jimmidyson

Copy link
Copy Markdown
Contributor

Thanks!

@vishh

vishh commented Nov 30, 2015

Copy link
Copy Markdown
Contributor

@mnuessler: Any updates?

@christianhuening

Copy link
Copy Markdown

Is there anything one could do to help getting this done? I've not looked into the sources or anything, but if it's merely a case of updating stuff and checking it, I might be able to do so.

@jimmidyson jimmidyson mentioned this pull request Dec 3, 2015
@carmark

carmark commented Dec 3, 2015

Copy link
Copy Markdown
Contributor

@mnuessler

I would like to help you do something if you are busy on other things. It seems this patch is aspired by many guys in #743.

@mnuessler

Copy link
Copy Markdown
Contributor Author

Sorry for delay. I managed to upgrade the InfluxDB client dependency to v0.9.5.1, but I had to rewrite commits in this branch. I also haven't tested it yet and I won't have time to do so before Monday.

Thanks @christianhuening and @carmark for your offer to help. I'm afraid I need to have a look first what still has to be done as I haven't worked on this for a while. But feel free to have a look at the code or do some testing if you like.

- Fix #743
- Rewrite InfluxDB storage for new InfluxDB API data structures.
- Store each measurement separately instead of storing all measurements
  in a single big "table" with many columns/fields.
- Use tags add metadata to points, such as the container name. Tags are
  a new feature in InfluxDB 0.9.
@mnuessler

Copy link
Copy Markdown
Contributor Author

Rebased on master and resolved merge conflicts due to recent storage driver refactoring.

@jimmidyson

Copy link
Copy Markdown
Contributor

Thanks for the update.

Travis showing failing gofmt check:

The following files are not properly formatted:
storage/influxdb/influxdb.go storage/influxdb/influxdb.go

@k8s-bot

k8s-bot commented Dec 11, 2015

Copy link
Copy Markdown
Collaborator

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

1 similar comment
@k8s-bot

k8s-bot commented Dec 12, 2015

Copy link
Copy Markdown
Collaborator

Can one of the admins verify that this patch is reasonable to test? (reply "ok to test", or if you trust the user, reply "add to whitelist")

If this message is too spammy, please complain to ixdy.

@marcellodesales

Copy link
Copy Markdown

@mnuessler @christianhuening @carmark Is there a way to revisit this PR and get it fixed? Is there a way to help?

@jimmidyson

Copy link
Copy Markdown
Contributor

Let me pull this down locally & submit a separate PR tomorrow with these changes & any necessary fixes.

@marcellodesales @carmark Feel free to do code review if you have time.

@christianhuening

Copy link
Copy Markdown

sorry was very busy over the holidays. I understand that the majority of the work has been done?

@marcellodesales

Copy link
Copy Markdown

@jimmidyson Thanks a lot for getting this! I hope I can do any code review after a PR that passes tests!

normanjoyner and others added 2 commits January 6, 2016 23:21
appeases gofmt by sorting imports in alphabetical order
sorts import statements alphabetically
@k8s-bot

k8s-bot commented Jan 7, 2016

Copy link
Copy Markdown
Collaborator

Jenkins GCE e2e

Build/test failed for commit 4263cc0.

@carmark

carmark commented Jan 7, 2016

Copy link
Copy Markdown
Contributor

@jimmidyson Thanks, it is my pleasure to do the code review.

@normanjoyner

Copy link
Copy Markdown

Submitted PR to fix missing InfluxDB models dependency. Tests failing on TestGetProcessNamePid which is fixed in dee3f07.

@googlebot

Copy link
Copy Markdown
Collaborator

We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm.

@k8s-bot

k8s-bot commented Jan 7, 2016

Copy link
Copy Markdown
Collaborator

Jenkins GCE e2e

Build/test failed for commit 54c6281.

@jimmidyson

Copy link
Copy Markdown
Contributor

This has now been superseded by #1040, including the commits from this PR & cleaning up a few things (including missing godeps). Closing this but please review/comment on #1040 so we can get that merged ASAP.

@jimmidyson jimmidyson closed this Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.