intelsdi-x / snap-plugin-collector-disk

Collects Linux disk metrics from /proc/diskstats
http://snap-telemetry.io/
Apache License 2.0
4 stars 23 forks source link

Make fail: Failed to retrieve a list of dependencies: Error resolving imports #46

Open saurabh-deochake opened 7 years ago

saurabh-deochake commented 7 years ago

Snap daemon version (use snapteld -v): snapteld version 1.3.0

Environment:

What happened: Upon make of source code, I get above error of [ERROR] Failed to retrieve a list of dependencies: Error resolving imports

What you expected to happen: make builds the plugin in ./build/

Steps to reproduce it (as minimally and precisely as possible):

  1. Clone the repo to $GOPATH/src/github.com/intelsdi-x/
  2. Build the plugin using make

Anything else do we need to know (e.g. issue happens only occasionally): Upon reviewing glide logs using glide --debug up, I found out that it cannot find a package fileutils at github.com/intelsdi-x/snap/pkg/fileutils.

Posting a snapshot of logs here:

[WARN]  Unable to checkout golang.org/x/sys/unix

**[ERROR] Error looking for golang.org/x/sys/unix: Cannot detect VCS**

[INFO]  Found Godeps.json file in /root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities
[INFO]  --> Parsing Godeps metadata...
[DEBUG] Trying to open github.com/intelsdi-x/snap-plugin-utilities/config (/root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config)
[DEBUG] Package github.com/intelsdi-x/snap-plugin-utilities/config imports github.com/intelsdi-x/snap/control/plugin
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[INFO]  --> Setting version for github.com/intelsdi-x/snap to 5c1177efc47eccc10dc459e3be44083372ea08c3.
[DEBUG] Package github.com/intelsdi-x/snap-plugin-utilities/config imports github.com/intelsdi-x/snap/core/ctypes
[DEBUG] Missing github.com/intelsdi-x/snap/core/ctypes. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/intelsdi-x/snap/control/plugin/encoding (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/control/plugin/encoding)
[DEBUG] Package github.com/intelsdi-x/snap/control/plugin/encoding imports github.com/intelsdi-x/snap/control/plugin/encrypter
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin/encrypter. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/intelsdi-x/snap/control/plugin/encrypter (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/control/plugin/encrypter)
[DEBUG] Trying to open github.com/intelsdi-x/snap/core/cdata (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/core/cdata)
[DEBUG] Package github.com/intelsdi-x/snap/core/cdata imports github.com/intelsdi-x/snap/core/ctypes

**[DEBUG] Missing github.com/intelsdi-x/snap/core/ctypes. Trying to resolve.**

[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core/cdata imports github.com/intelsdi-x/snap/pkg/ctree
[DEBUG] Missing github.com/intelsdi-x/snap/pkg/ctree. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/intelsdi-x/snap/core/ctypes (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/core/ctypes)
[DEBUG] Trying to open github.com/asaskevich/govalidator (/root/.glide/cache/src/https-github.com-asaskevich-govalidator)
[DEBUG] Trying to open github.com/intelsdi-x/snap/core/serror (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/core/serror)
[DEBUG] Trying to open github.com/intelsdi-x/snap/pkg/fileutils (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils)
[DEBUG] ImportDir error on /root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils: open /root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils: no such file or directory

**[ERROR] Error scanning github.com/intelsdi-x/snap/pkg/fileutils: open /root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/fileutils: no such file or directory**

[ERROR] This error means the referenced package was not found.
[ERROR] Missing file or directory errors usually occur when multiple packages
[ERROR] share a common dependency and the first reference encountered by the scanner
[ERROR] sets the version to one that does not contain a subpackage needed required
[ERROR] by another package that uses the shared dependency. Try setting a
[ERROR] version in your glide.yaml that works for all packages that share this
[ERROR] dependency.
[DEBUG] Trying to open github.com/intelsdi-x/snap/pkg/schedule (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/schedule)
[DEBUG] Package github.com/intelsdi-x/snap/pkg/schedule imports github.com/Sirupsen/logrus
[DEBUG] Missing github.com/Sirupsen/logrus. Trying to resolve.
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/pkg/schedule imports github.com/robfig/cron
[DEBUG] Missing github.com/robfig/cron. Trying to resolve.
[INFO]  --> Fetching updates for github.com/robfig/cron
[INFO]  --> Setting version for github.com/robfig/cron to 32d9c273155a0506d27cf73dd1246e86a470997e.
[DEBUG] Trying to open github.com/intelsdi-x/snap/scheduler/wmap (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/scheduler/wmap)
[DEBUG] Package github.com/intelsdi-x/snap/scheduler/wmap imports github.com/intelsdi-x/snap/core/cdata
[DEBUG] Missing github.com/intelsdi-x/snap/core/cdata. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/scheduler/wmap imports github.com/intelsdi-x/snap/core/ctypes
[DEBUG] Missing github.com/intelsdi-x/snap/core/ctypes. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/scheduler/wmap imports gopkg.in/yaml.v2
[DEBUG] Missing gopkg.in/yaml.v2. Trying to resolve.
[INFO]  --> Fetching gopkg.in/yaml.v2
[WARN]  Unable to checkout gopkg.in/yaml.v2

**[ERROR] Error looking for gopkg.in/yaml.v2: Cannot detect VCS**

[DEBUG] Trying to open github.com/intelsdi-x/snap/pkg/ctree (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/pkg/ctree)
[DEBUG] Package github.com/intelsdi-x/snap/pkg/ctree imports github.com/Sirupsen/logrus
[DEBUG] Missing github.com/Sirupsen/logrus. Trying to resolve.
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/Sirupsen/logrus has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/robfig/cron (/root/.glide/cache/src/https-github.com-robfig-cron)
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports
PatrykMatyjasek commented 7 years ago

@saurabh-deochake did you tried with "glide cc" command?

IzabellaRaulin commented 7 years ago

I agree with @PatrykMatyjasek - posted logs point that cached deps are used and that might be a root cause of your issue - [DEBUG] Trying to open github.com/intelsdi-x/snap/control/plugin/encoding (/root/.glide/cache/src/https-github.com-intelsdi-x-snap/control/plugin/encoding)

saurabh-deochake commented 7 years ago

Thank you for your reply @PatrykMatyjasek and @IzabellaRaulin. I tried glide cc, however I am still getting the same problem. I also get Cannot detect CVS errors for golang.org/x/sys/unix and gopkg.in/yaml.v2.

I posting some excerpts of the glide --debug here:

...
...
[WARN]  Unable to checkout github.com/intelsdi-x/snap
[ERROR] Error looking for github.com/intelsdi-x/snap/control/plugin: Unable to get repository
..
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin/cpolicy. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/core/cdata
[DEBUG] Missing github.com/intelsdi-x/snap/core/cdata. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/core/serror
[DEBUG] Missing github.com/intelsdi-x/snap/core/serror. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/pkg/fileutils
[DEBUG] Missing github.com/intelsdi-x/snap/pkg/fileutils. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/pkg/schedule
[DEBUG] Missing github.com/intelsdi-x/snap/pkg/schedule. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Package github.com/intelsdi-x/snap/core imports github.com/intelsdi-x/snap/scheduler/wmap
[DEBUG] Missing github.com/intelsdi-x/snap/scheduler/wmap. Trying to resolve.
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Fetching updates skipped
[DEBUG] Dependency github.com/intelsdi-x/snap has already been pinned. Setting version skipped
[DEBUG] Trying to open github.com/Sirupsen/logrus (/root/.glide/cache/src/https-github.com-Sirupsen-logrus)
[DEBUG] Package github.com/Sirupsen/logrus imports golang.org/x/crypto/ssh/terminal
[DEBUG] Missing golang.org/x/crypto/ssh/terminal. Trying to resolve.
[INFO]  --> Fetching golang.org/x/crypto/ssh/terminal
[WARN]  Unable to checkout golang.org/x/crypto/ssh/terminal
[ERROR] Error looking for golang.org/x/crypto/ssh/terminal: Cannot detect VCS
...
...
[WARN]  Unable to checkout golang.org/x/sys/unix
[ERROR] Error looking for golang.org/x/sys/unix: Cannot detect VCS
[DEBUG] Trying to open github.com/intelsdi-x/snap-plugin-utilities/config (/root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config)
[DEBUG] ImportDir error on /root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config: open /root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config: no such file or directory
...
...
[DEBUG] Missing gopkg.in/yaml.v2. Trying to resolve.
[INFO]  --> Fetching gopkg.in/yaml.v2
[WARN]  Unable to checkout gopkg.in/yaml.v2
[ERROR] Error looking for gopkg.in/yaml.v2: Cannot detect VCS
[DEBUG] Trying to open github.com/intelsdi-x/snap-plugin-utilities/config (/root/.glide/cache/src/https-github.com-intelsdi-x-snap-plugin-utilities/config)
[DEBUG] Package github.com/intelsdi-x/snap-plugin-utilities/config imports github.com/intelsdi-x/snap/control/plugin
[DEBUG] Missing github.com/intelsdi-x/snap/control/plugin. Trying to resolve.
...
...
[ERROR] Failed to retrieve a list of dependencies: Error resolving imports

Am I missing anything?