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

Unix.ENAMETOOLONG when using datakit-bridge-local-git #621

Closed
Thegaram opened this issue Mar 2, 2018 · 3 comments
Closed

Unix.ENAMETOOLONG when using datakit-bridge-local-git #621

Thegaram opened this issue Mar 2, 2018 · 3 comments

Comments

@Thegaram
Copy link
Contributor

Thegaram commented Mar 2, 2018

tl;dr

I see the following error:

9p error: Unix.Unix_error(Unix.ENAMETOOLONG, "open", "/data/.git/lock/refs/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dstatus_5f5f2dme_5f5f2dmy_5f5f5f2dproject_5f5f2dref_5f5f2dheads_5f5f2dstatus_5f5f5f2dme_5f5f5f2dmy_5f5f5f5f2dproject_5f5f5f2dref_5f5f5f2dheads_5f5f5f2dgithub_5f5f5f5f2dmetadata")

Details

I run a DataKit server using Docker:

$ docker run -it --net datakit-net --name datakit -v [path_to_my_repo]:/data -p 5640:5640 datakit/db
Starting datakit %%VERSION%% ...
datakit: [INFO] accepted a new connection on tcp://0.0.0.0:5640
...

And use the datakit-bridge-local-git module with a local git repository:

$ docker run --name git-bridge --net datakit-net -v [path_to_my_repo]:/data datakit/local-bridge me/my-project:/data --metadata-store tcp:datakit:5640
2018-03-02 15:59.18 INF [bridge-local-git] Connecting to DataKit server on tcp:localhost:5640
...

When I try to run the CI (using the example setup under ci/skeleon) I get the following output:

$ docker run --name my-ci --net datakit-net -p 8443:8443 my-ci --metadata-store tcp:datakit:5640
2018-03-02 15:23.48 INF [datakit-ci] Generating new private key...
2018-03-02 15:23.49 APP [datakit-ci] >>> Configure the CI by visiting
                                     https://127.0.0.1:8443/auth/intro/oRygfFk0IN8wujdTAfmsdOHpOLlfp3n0
2018-03-02 15:23.49 INF [datakit-ci] Connecting to DataKit server on tcp:datakit:5640
2018-03-02 15:23.49 INF [datakit-ci] Starting monitor loop
2018-03-02 15:23.50 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-github_2dmetadata: my-test -> Success!
2018-03-02 15:23.50 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-master: my-test -> Success!
2018-03-02 15:23.50 INF [datakit-ci] Flush: Set me/my-project/ref/heads/master:my-test to Success!
2018-03-02 15:23.50 INF [datakit-ci] Flush: Set me/my-project/ref/heads/github-metadata:my-test to Success!
2018-03-02 15:23.50 INF [datakit-ci] Flush: Set me/my-project/ref/heads/github-metadata:my-test to Success!
2018-03-02 15:23.51 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-commit_2dindex: my-test -> Success!
2018-03-02 15:23.51 INF [datakit-ci] Flush: Set me/my-project/ref/heads/commit-index:my-test to Success!
2018-03-02 15:23.51 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dgithub_5f2dmetadata: my-test -> Success!
2018-03-02 15:23.52 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dmaster: my-test -> Success!
2018-03-02 15:23.52 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-master:my-test to Success!
2018-03-02 15:23.52 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-github_2dmetadata:my-test to Success!
2018-03-02 15:23.52 INF [datakit-ci] Flush: Set me/my-project/ref/heads/github-metadata:my-test to Success!
2018-03-02 15:23.53 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dcommit_5f2dindex: my-test -> Success!
2018-03-02 15:23.54 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dgithub_5f5f2dmetadata: my-test -> Success!
2018-03-02 15:23.54 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dgithub_5f2dmetadata:my-test to Success!
2018-03-02 15:23.54 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-github_2dmetadata:my-test to Success!
2018-03-02 15:23.54 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-commit_2dindex:my-test to Success!
2018-03-02 15:23.54 INF [datakit-ci] Flush: Set me/my-project/ref/heads/github-metadata:my-test to Success!
2018-03-02 15:23.54 INF [datakit-ci] Flush: Set me/my-project/ref/heads/commit-index:my-test to Success!
2018-03-02 15:23.56 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dcommit_5f5f2dindex: my-test -> Success!
2018-03-02 15:23.56 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dmaster: my-test -> Success!
2018-03-02 15:23.57 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dstatus_5f5f2dme_5f5f2dmy_5f5f5f2dproject_5f5f2dref_5f5f2dheads_5f5f2dgithub_5f5f5f2dmetadata: my-test -> Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dgithub_5f5f2dmetadata:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dmaster:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dgithub_5f2dmetadata:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dcommit_5f2dindex:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-github_2dmetadata:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/status-me-my_2dproject-ref-heads-commit_2dindex:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/github-metadata:my-test to Success!
2018-03-02 15:23.57 INF [datakit-ci] Flush: Set me/my-project/ref/heads/commit-index:my-test to Success!
2018-03-02 15:24.00 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dstatus_5f5f2dme_5f5f2dmy_5f5f5f2dproject_5f5f2dref_5f5f2dheads_5f5f2dcommit_5f5f5f2dindex: my-test -> Success!
2018-03-02 15:24.00 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dstatus_5f5f2dme_5f5f2dmy_5f5f5f2dproject_5f5f2dref_5f5f2dheads_5f5f2dmaster: my-test -> Success!
2018-03-02 15:24.01 INF [datakit-ci] Record: status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dstatus_5f5f2dme_5f5f2dmy_5f5f5f2dproject_5f5f2dref_5f5f2dheads_5f5f2dstatus_5f5f5f2dme_5f5f5f2dmy_5f5f5f5f2dproject_5f5f5f2dref_5f5f5f2dheads_5f5f5f2dgithub_5f5f5f5f2dmetadata: my-test -> Success!
Failure:
9p error: Unix.Unix_error(Unix.ENAMETOOLONG, "open", "/data/.git/lock/refs/heads/status-me-my_2dproject-ref-heads-status_2dme_2dmy_5f2dproject_2dref_2dheads_2dstatus_5f2dme_5f2dmy_5f5f2dproject_5f2dref_5f2dheads_5f2dstatus_5f5f2dme_5f5f2dmy_5f5f5f2dproject_5f5f2dref_5f5f2dheads_5f5f2dstatus_5f5f5f2dme_5f5f5f2dmy_5f5f5f5f2dproject_5f5f5f2dref_5f5f5f2dheads_5f5f5f2dgithub_5f5f5f5f2dmetadata")

@talex5 After resolving these, I'll try to write up something in a PR about setting up a local CI workflow for other newbies like me :D

@talex5
Copy link
Contributor

talex5 commented Mar 2, 2018

Are you by any chance trying to use your source code repository as the CI database repository? If so, every time the CI writes out its state, it will try to perform the CI tests on the new branch, which will not end well...

There should be two separate Git repositories:

  1. The code you want to run CI on.
  2. The one where the CI stores the results (logs, etc).

@Thegaram
Copy link
Contributor Author

Thegaram commented Mar 2, 2018

Oh that explains. So the first one is the one I specify for datakit/local-bridge and the second one is the one I specify for datakit/db, right?

@talex5
Copy link
Contributor

talex5 commented Mar 2, 2018

Yes.

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

No branches or pull requests

2 participants