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

OX_REPO_NAME has wrong value #334

Closed
roedie opened this issue Feb 22, 2016 · 11 comments
Closed

OX_REPO_NAME has wrong value #334

roedie opened this issue Feb 22, 2016 · 11 comments
Assignees

Comments

@roedie
Copy link
Contributor

roedie commented Feb 22, 2016

During some testing I dumped env to a file using a hook and noticed OX_REPO_NAME was wrong. In my config I configured:

repo: "/home/oxidized/git/default.git"

for hosts that are not in a group. But, all of my devices are in a group, the default.git repo does not even exist, and I'm pretty sure this device's config is written in /home/oxidized/git/mydevices.git. Still, I get the following output:

OX_NODE_FROM=
OX_EVENT=post_store
OX_NODE_MSG=
OX_NODE_GROUP=mygroup
OX_NODE_NAME=mydevice
OX_JOB_STATUS=success
PWD=/
OX_REPO_COMMITREF=b9df0bc7b62023566606fd0024caf17527a7f383
OX_REPO_NAME=/home/oxidized/git/default.git
OX_JOB_TIME=50.121631829

I would expect OX_REPO_NAME to have /home/oxidized/git/mydevices.git as value.

@danilopopeye
Copy link
Contributor

I am pretty sure this will be fixed in #326

@roedie
Copy link
Contributor Author

roedie commented Feb 22, 2016

Ah, big modification I see. I'll wait and test when it's merged.

@danilopopeye
Copy link
Contributor

@roedie did you managed to check if #326 has fixed?

@roedie
Copy link
Contributor Author

roedie commented Mar 30, 2016

I checked it but now the OX_REPO_NAME is empty:

OX_NODE_FROM=
OX_EVENT=post_store
OX_NODE_MSG=
OX_NODE_GROUP=just-an-average-group
OX_NODE_NAME=just-a-casual-node
OX_JOB_STATUS=success
PWD=/
OX_REPO_COMMITREF=bbc3e35081b95347d5b8afd486d25136c7f9657d
OX_REPO_NAME=
OX_JOB_TIME=5.708300124

I don't have a big issue with it anymore since I don't think I will need that variable anymore, but it still might be a bug.

@ytti
Copy link
Owner

ytti commented May 5, 2016

@danilopopeye any thoughts?

@danilopopeye
Copy link
Contributor

@ytti I'll try to have a look at this this week. 👍 Never really used the exec hook myself.

@danilopopeye
Copy link
Contributor

@ytti can you assign this to me? I keep forgetting to fix it 😞

@ytti ytti assigned ytti and unassigned ytti May 25, 2016
@danilopopeye danilopopeye self-assigned this May 25, 2016
@danilopopeye
Copy link
Contributor

@roedie which version are you using? Testing here with e95cd26 and 0.14.3 I couldn't reproduce your problem. 😞

output:
  default: git
  git:
    user: Oxidized Development
    email: developer@oxidized.local
    repo:
      englab:  "~/.config/oxidized/git-repos/englab.git"
      telecom: "~/.config/oxidized/git-repos/telecom.git" 
OX_EVENT=post_store
OX_NODE_NAME=10.X.X.9
OX_NODE_FROM=
OX_NODE_MSG=
OX_NODE_GROUP=englab
OX_REPO_COMMITREF=06c8cef09f9fc6be53209735a89012ac9275ba30
OX_REPO_NAME=/home/dsgoncalves/.config/oxidized/git-repos/englab.git
OX_JOB_STATUS=success
OX_JOB_TIME=2.167455403
OX_EVENT=node_fail
OX_NODE_NAME=10.X.X.85
OX_NODE_FROM=
OX_NODE_MSG=
OX_NODE_GROUP=telecom
OX_REPO_COMMITREF=
OX_REPO_NAME=/home/dsgoncalves/.config/oxidized/git-repos/telecom.git
OX_JOB_STATUS=no_connection
OX_JOB_TIME=11.032248236

@roedie
Copy link
Contributor Author

roedie commented Jun 8, 2016

@danilopopeye I'm currently using 0.14.3. But, looking at my config again there might be something fishy going on. I have
repo: "/home/oxidized/git/default.git"
in my config. And funny enough my configs are backupped in /home/oxidized/git/.git. Maybe that's the reason the OX_REPO_NAME is empty.

@danilopopeye
Copy link
Contributor

I have
repo: "/home/oxidized/git/default.git"

Can you specify the directory of the repository of all configs in the config. like what I showed in the last comment and report if it fixed?
I think I forgot to update the README after some change. 😞

@ytti
Copy link
Owner

ytti commented Aug 29, 2016

Closed due to #503

@ytti ytti closed this as completed Aug 29, 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

No branches or pull requests

3 participants