sabre1041 / ose-jenkins-cluster

[DEPRECATED] Jenkins slave cluster on OpenShift
17 stars 64 forks source link

cannot deploy jenkins-external-services #1

Open xelfe opened 8 years ago

xelfe commented 8 years ago

When we try to do the step oc new-app --template=jenkins-external-services -p JENKINS_IP=XXX.XXX.XXX.XXX from http://blog.andyserver.com/2016/02/jenkins-slaves-openshift-external-jenkins-environment/ , we got this error;

--> Deploying template jenkins-external-services for "jenkins-external-services"
     With parameters:
      Jenkins Service Name=jenkins
      JENKINS_IP=XXX.XXX.XXX.XXX
--> Creating resources ...
    error: Endpoints "jenkins" is invalid: subsets[0].addresses[0].ip: Invalid value: "": must be a valid IPv4 address
sabre1041 commented 8 years ago

@xelfe which version of OpenShift are you running this in?

xelfe commented 8 years ago

on the lasted 3.1 origin

2016-02-24 20:36 GMT-05:00 Andrew Block notifications@github.com:

@xelfe https://github.com/xelfe which version of OpenShift are you running this in?

— Reply to this email directly or view it on GitHub https://github.com/sabre1041/ose-jenkins-cluster/issues/1#issuecomment-188552227 .

kurktchiev commented 8 years ago

I am getting the same problem on OSE 3.1.1.6 with a git pull as of a few mins ago.

kurktchiev commented 8 years ago

actually i fail with a bit more output:

--> Deploying template jenkins-external-services for "jenkins-external-services"
     With parameters:
      Jenkins Service Name=jenkins
      JENKINS_IP=xxx.xxx.xxx.xxx
--> Creating resources ...
    error: Endpoints "jenkins" is invalid: subsets[0].addresses[0].ip: invalid value '', Details: invalid IPv4 address
    service "jenkins" created
    error: Endpoints "jenkins-slave" is invalid: subsets[0].addresses[0].ip: invalid value '', Details: invalid IPv4 address
    service "jenkins-slave" created```
sabre1041 commented 8 years ago

@xelfe @ebalsumgo ill investigate the issue and get back to you both

sabre1041 commented 8 years ago

@xelfe @ebalsumgo Tested with OpenShift Enterprise 3.1.1

Here is what I observe when running the command

[root@master ~]# oc version
oc v3.1.1.6-16-g5327e56
kubernetes v1.1.0-origin-1107-g4c8e6f4
[root@master ~]# oc new-app --template=jenkins-external-services -p JENKINS_IP=10.1.4.2
--> Deploying template jenkins-external-services for "jenkins-external-services"
     With parameters:
      Jenkins Service Name=jenkins
      JENKINS_IP=10.1.4.2
--> Creating resources ...
    Endpoints "jenkins" created
    Service "jenkins" created
    Endpoints "jenkins-slave" created
    Service "jenkins-slave" created
--> Success
    Run 'oc status' to view your app.
kurktchiev commented 8 years ago

Dunno:

root@osmaster0s:~:
----> oc version
oc v3.1.1.6-16-g5327e56
kubernetes v1.1.0-origin-1107-g4c8e6f4

I am getting the above message no matter what. I am setup on a 2 master, 3 node cluster. 3 nodes are label separated and house specific projects.

sabre1041 commented 8 years ago

This is the code doing the validation

// IsValidIPv4 tests that the argument is a valid IPv4 address.
func IsValidIPv4(value string) bool {
    return net.ParseIP(value) != nil && net.ParseIP(value).To4() != nil
}
kurktchiev commented 8 years ago

I am guessing it might be a problem with the fact that in our installs docker initiates a slew of virtual interfaces maybe?

-B

-- Please excuse spelling and grammar errors, this has been sent from my iPhone/iPad

On Feb 29, 2016, at 22:24, Andrew Block notifications@github.com wrote:

This is the code doing the validation

// IsValidIPv4 tests that the argument is a valid IPv4 address. func IsValidIPv4(value string) bool { return net.ParseIP(value) != nil && net.ParseIP(value).To4() != nil } — Reply to this email directly or view it on GitHub.

kurktchiev commented 8 years ago

Also any dependency on root? At least in my environment RunAsAny is NOT set

kurktchiev commented 8 years ago

NM ignore above comment, I just ran through the dockerfiles and the templates and dont see anything that should get tripped up by that. Not sure where else to look to fix this.

sabre1041 commented 8 years ago

@ebalsumgo would you be able to provide the IP address you are trying to use? if not, can you try to replicate my example from above and if it works, try to edit the service and substitute your address

kurktchiev commented 8 years ago

I am using an external IP (pointing it to our live/master Jenkins instance which lives outside of OSE) its in the 152.19.* range

sabre1041 commented 8 years ago

@ebalsumgo I validated the IP address you provided against my own OpenShift 3.1 environment and used the latest Red Hat Container Development Kit

kurktchiev commented 8 years ago

@sabre1041 not really sure where that leaves us then :)

techno-wizardry commented 8 years ago

FYI I too am hit with this (tried with @sabre1041 IP example too) :

# oc version
oc v3.2.0.44
kubernetes v1.2.0-36-g4a3f9c5
# oc new-app --template=jenkins-external-services -p JENKINS_IP=10.1.4.2
--> Deploying template jenkins-external-services for "jenkins-external-services"
     With parameters:
      Jenkins Service Name=jenkins
      JENKINS_IP=10.1.4.2
--> Creating resources ...
    error: Endpoints "jenkins" is invalid: subsets[0].addresses[0].ip: Invalid value: "": must be a valid IPv4 address
    service "jenkins" created
    error: Endpoints "jenkins-slave" is invalid: subsets[0].addresses[0].ip: Invalid value: "": must be a valid IPv4 address
    service "jenkins-slave" created
sabre1041 commented 8 years ago

@bigashman thanks for reporting the issue. Would you be able to share your system operating system as well.

Thanks

techno-wizardry commented 8 years ago

sure - I'm on:

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)
# uname -r
3.10.0-327.18.2.el7.x86_64
sabre1041 commented 8 years ago

@xelfe @bigashman @ebalsumgo finally figured this one out

https://github.com/sabre1041/ose-jenkins-cluster/commit/196113910a6ea2bcc2949b5e6ad8729c98e089c4

Strange it was not occurring on OSX. If you could give it a try again, it would be appreciated as to close this issue

ghyde commented 8 years ago

I was also having this issue on RHEL 7.2, but the recent commit fixed it.