Wednesday, 2019-05-22

*** altlogbot_2 has quit IRC00:10
*** altlogbot_0 has joined #openstack-qinling00:12
*** goldyfruit has quit IRC01:06
*** goldyfruit has joined #openstack-qinling01:31
*** goldyfruit has quit IRC02:54
*** heychirag has quit IRC05:29
*** heychirag has joined #openstack-qinling05:33
*** goldyfruit has joined #openstack-qinling13:07
goldyfruitlxkong, second part: https://review.opendev.org/#/c/660789/18:03
nsherry4I'm following the install instructions here (https://docs.openstack.org/qinling/latest/admin/install/install_ubuntu.html) but on RHEL7. I hit the finalize step, and the systemd service files are referring to files in /usr/lical/bin which don't seem to exist. Anyone know what these should be symlinked to?18:52
goldyfruitnsherry4, where is you qinling-api file ?19:28
nsherry4goldyfruit: I put the qinling-api service file in the suggested location '/etc/systemd/system/qinling-api.service'19:30
nsherry4systemd picks it up, but fails at the exec stage, not finding the binary19:31
goldyfruitBut you did install qinling ?19:31
nsherry4I installed it as the documentation suggested by doing a `git clone`19:32
goldyfruitand "pip install -e ." ?19:32
nsherry4yes19:32
goldyfruitSo if you ran the pip command then the binary should be in /usr/local/bin19:32
goldyfruitNo error during the pip install ?19:33
nsherry4# pip list | grep -i qinling19:33
nsherry4qinling (1.0.1.dev5, /var/lib/qinling/qinling)19:33
nsherry4no errors that I saw19:33
goldyfruitfind / -name qinling-api19:34
nsherry4since then, I went ahead and symlinked the files in `/var/lib/qinling/qinling/qinling/cmd/`19:34
nsherry4Looks like it landed in /usr/bin/qinling-api19:35
goldyfruitCool19:35
nsherry4thanks19:35
goldyfruitSo you just have to link it there19:35
goldyfruitsame for qinling-engine19:35
nsherry4That's picking it up now, great19:38
goldyfruitCool!19:40
goldyfruitnsherry4, how things are going ?20:31
nsherry4I'm using microk8s as my backend and have no idea what to do here...20:36
goldyfruitQinling needs to connect to Kubernetes and to etcd20:37
goldyfruitmicrok8s setup an etcd server ?20:37
nsherry4I've installed microk8s with snap and etcd from yum20:38
goldyfruitOk20:38
goldyfruitetcd is running with or without SSL ?20:38
nsherry4ahh20:38
nsherry4I don't know. I never enabled it, and all the URLs in the config file are http://20:39
goldyfruitDid you use this documentation https://docs.openstack.org/install-guide/environment-etcd-rdo.html ?20:39
nsherry4I did20:39
goldyfruitThen there is no SSL, easier for now :)20:40
nsherry4except it didn't seem to like ETCD_NAME="controller"20:40
goldyfruitDoesn't matter20:40
goldyfruitIn qinling.conf you need to set your etcd20:40
goldyfruithttps://paste.api-zulu.com/fipexiyabi.ini20:40
goldyfruitWhere host is equal to your IP of course20:41
goldyfruitboth api and engine need to connect to the etcd server20:41
goldyfruitThen the next step will be to configure the engine to speak with your Kubernetes cluster20:41
goldyfruitI guess your Kubernest API will be http://YOUR-IP:808020:43
nsherry4microk8s.config seems to indicate it's https://MY-IP:1644320:43
nsherry4which is what I've set the kube_host value to20:44
goldyfruitIf you "curl https://MY-IP:16443 -I" what do you have ?20:44
nsherry4short version: 'curl: (60) Peer's Certificate issuer is not recognized.'20:45
goldyfruitadd -k20:45
nsherry4HTTP/1.1 401 Unauthorized Content-Type: application/json Www-Authenticate: Basic realm="kubernetes-master" Date: Wed, 22 May 2019 20:45:58 GMT Content-Length: 16520:45
goldyfruitOk, so this is your endpoint20:46
goldyfruitIn /var/microk8s/current/certs you should have certificates20:46
nsherry4I don't have that folder20:46
nsherry4I assume because it was installed via snap20:46
nsherry4looks like its in /snap/microk8s/current/certs20:47
nsherry4all I see in there is csr.conf.template20:47
goldyfruitOki20:47
goldyfruitNothing in /var/snap/microk8s/current ?20:47
nsherry4oh, yes20:48
nsherry4ca.crt  ca.key  ca.srl  csr.conf  kubelet.crt  kubelet.key  server.crt  server.csr  server.key  serviceaccount.key20:48
goldyfruitcool20:48
goldyfruitSo I guess you will need: ca.crt, server.crt and server.key20:51
nsherry4those match ssl_ca_cert, cert_file, and key_file respectively?20:52
nsherry4Okay, I don't see any more connection/ssl errors in journalctl for qinling-engine or qinling-api21:01
nsherry4and the openstack runtime/function list commands return empty strings instead of errors21:01
goldyfruitYes, for the question above21:01
goldyfruitYou should see: "Function mapping handler started."21:02
goldyfruit"Starting engine..."21:02
goldyfruitIn the engine log21:02
nsherry4yup21:03
goldyfruitCould you please run this command: kubectl get netpol -n qinling21:03
nsherry4NAME                        POD-SELECTOR   AGE21:03
goldyfruitThis is created by qinling-engine when it's connected to the Kubernetes cluster21:03
nsherry4allow-qinling-engine-only   <none>         10m21:03
goldyfruitCool21:03
goldyfruitqinling-engine and your Kubernetes are speaking togheter21:04
nsherry4nice21:04
nsherry4So would the next step be adding a runtime?21:05
goldyfruitThis network could be an issue as mentioned here: https://storyboard.openstack.org/#!/story/200571021:05
goldyfruitSo to avoid any issue right, I invite you to remove it (it will be re-created when qinling-engine will restart)21:05
goldyfruitkubectl delete networkpolicy allow-qinling-engine-only -n qinling21:05
goldyfruitYes, next step is the engine21:06
goldyfruitI got error with python2 runtime, I used the python321:06
goldyfruitopenstack runtime create openstackqinling/python3-runtime --name python321:06
nsherry4are these included in the git repo in the 'runtime' folder?21:07
goldyfruitopenstackqinling/python3-runtime from Docker hub21:07
goldyfruithttps://hub.docker.com/r/openstackqinling/python3-runtime21:07
nsherry4just `openstack runtime create openstackqinling/python3-runtime`?21:08
goldyfruityep21:08
goldyfruitkubectl get pod -n qinling21:09
goldyfruitshould returns pods21:09
goldyfruitstarting with the ID of your runtime (openstack runtime list)21:10
nsherry4neat, looks like it's created 3 of them21:10
nsherry4or, creating21:10
goldyfruitYeah, because of the replicaset21:10
goldyfruithttps://github.com/openstack/qinling/blob/bc0e64b94a83b8b433a1e6161b60e9490d76f5f3/qinling/orchestrator/kubernetes/templates/deployment.j221:11
goldyfruithttps://github.com/openstack/qinling/blob/bc0e64b94a83b8b433a1e6161b60e9490d76f5f3/qinling/config.py#L144-L14821:11
nsherry4okay, so we could change that later if we wanted to21:12
goldyfruityep, inside the [kubernetes] section21:12
goldyfruitIs your runtime in Running state ?21:12
nsherry4Is that going to be an initial size which would scale with demand?21:13
nsherry4or is it more of a static allocation setting21:13
goldyfruitThe replicaset if more for failure perspective21:13
nsherry4like host machine failures?21:14
goldyfruityeah21:14
nsherry4okay, so that'll make more sense once we scale k8s a bit21:15
goldyfruithttps://kubernetes.io/docs/concepts/workloads/controllers/replicaset/21:15
nsherry4so now that the runtime is defined and available in k8s, the next step is to define a function?21:16
goldyfruitCorrect21:16
nsherry4I'll actually have to do that, first, I guess.21:16
nsherry4write one21:16
goldyfruitopenstack function create --name hello_world --runtime YOUR-RUNTIME-ID --entry hello_world.main --file hello_world.py21:18
goldyfruithello_world.py content: https://paste.api-zulu.com/iribukopof.py21:18
nsherry4where will the arguments come from in this case? Are they translated from a REST call?21:21
goldyfruitThat is just a function without args21:21
goldyfruitJust to test the function/runtime21:21
goldyfruitWhen you need to set arguments, there is the --input option in the "openstack function execution" CLI21:22
goldyfruitThat is a nice example of how to use Python runtime with package: https://medium.com/@n.neerja28/tutorial-on-how-to-create-a-python-function-with-libraries-in-a-package-d8a9b2f5e4621:22
nsherry4on `openstack function create` I see Unable to establish connection to http://<IP>:7070/v1/functions: ('Connection aborted.', BadStatusLine("''",))21:27
goldyfruitIs your Kubernetes cluster able to reach the Qinling API endpoint ?21:28
nsherry4I'm not sure... They're both on the same machine, but the keystone service/endpoints are all through an HAProxy server21:29
nsherry4I've opened up 7070 on it, and can run other commands, but I don't know if/how to configure k8s to handle that21:30
goldyfruitqinling-api is listening on all the interfaces or only on 127.0.0.1 ?21:31
goldyfruitss -plantu | grep 707021:31
nsherry4looks like it's listening on it's 10.x.x.x IP address21:32
nsherry4don't see localhost21:32
goldyfruitif you run "curl http://<IP>:7070/v1/functions" ?21:33
goldyfruit401 ?21:33
nsherry4yup21:34
goldyfruitOK, so it's in your Kubernest cluster21:34
goldyfruitWhat do you have in qinling logs ?21:35
goldyfruitIf you shut your firewall ?21:38
nsherry4https://pastebin.com/QXCSrXqD21:38
goldyfruitCheck if your forward is enable ?21:38
goldyfruitiptables -P FORWARD ACCEPT21:38
nsherry4blank output21:38
goldyfruit iptables -P FORWARD ACCEPT enables FORWARD :_21:39
nsherry4same error21:41
goldyfruitYou have deleted the network policy right ?21:41
goldyfruitFrom Kubernetes21:41
nsherry4trying to delete it again with the same command gives 'not found'21:42
goldyfruitok21:42
nsherry4I'm using the dns name of the haproxy server in all the config rather than the IP address. Could it be that microk8s isn'21:44
nsherry4isn't or can't do name resolution outside of itself?21:44
goldyfruitBut your Qinling API endpoint is an IP ?21:44
nsherry4no, our setup is all done using hostnames rather than IPs, so I followed that convention21:45
goldyfruit http://<IP>:7070/v1/functions: ('Connection aborted.', BadStatusLine("''",))21:45
goldyfruitSo here it's not and <IP> but <DNS> ?21:45
nsherry4yes21:45
nsherry4sorry21:46
goldyfruitoh21:46
goldyfruitFrom https://microk8s.io/docs/21:47
goldyfruitThere are few steps about firewall/dns21:47
goldyfruitsudo ufw allow in on cbr0 && sudo ufw allow out on cbr021:47
goldyfruitI guess you are using firewalld21:47
goldyfruitmicrok8s.inspect21:49
nsherry4you want me to send the tar file it generated?21:51
nsherry4or just look at some of the output21:51
goldyfruithttps://github.com/ubuntu/microk8s/issues/7521:51
goldyfruitI don't know microk8s21:52
goldyfruitDid you try to enable the DNS in microk8s ?21:55
goldyfruitmicrok8s.enable dns21:55
nsherry4It's already on21:55
nsherry4I think I'm going to go back and change all the hostname entries in the db/config to ip addresses, which will take a while21:56
nsherry4It's getting to be end of day here, so I think I'll pick this up tomorrow21:56
goldyfruit6pm here21:56
nsherry4same21:56
nsherry4Thank you for all your help, I'm definitely further ahead than I would be otherwise21:57
goldyfruitYou're welcome, you're very close to have Qinling working :)21:57
nsherry4I'm looking forward to it. it definitely has a bit of a cool factor21:58
nsherry4bye for now21:58
goldyfruitSee you21:58
*** goldyfruit_ has joined #openstack-qinling22:28
*** goldyfruit has quit IRC22:30
*** goldyfruit_ has quit IRC22:33
*** goldyfruit has joined #openstack-qinling22:42
*** goldyfruit has quit IRC23:21
*** goldyfruit has joined #openstack-qinling23:53

Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!