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

fix restapi startup #7056

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Conversation

kakkotetsu
Copy link
Contributor

Why I did it

go-server-server doesn't start in restapi container.
restapi is docker-config-engine-stretch base container, and it has no Python3 but only Python2.

How I did it

I changed from python3 to python in supervisord.conf.

How to verify it

go-server-server starts in restapi container, if specified RESTAPI configs in /etc/sonic/config_db.json.

$ show services
...<snip>

restapi docker
---------------------------
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.1  59276 21512 pts/0    Ss+  Mar12   1:05 /usr/bin/python /usr/local/bin/supervisord
root        12  0.0  0.0 262988  3592 pts/0    Sl   Mar12   0:00 /usr/sbin/rsyslogd -n -iNONE
root        24  0.0  0.1 1010616 19320 pts/0   Sl   Mar12   0:03 /usr/sbin/go-server-server -enablehttp=true -enablehttps=true -servercert=/etc/sonic/credentials/server_selfsigned.crt -serverkey=/etc/sonic/credentials/server_selfsigned.key -clientcert=/etc/sonic/credentials/client_selfsigned.crt -clientcertcommonname=SonicCLient -loglevel=trace


$ show run all | jq .RESTAPI
{
  "certs": {
    "ca_crt": "/etc/sonic/credentials/client_selfsigned.crt",
    "client_crt_cname": "SonicCLient",
    "server_crt": "/etc/sonic/credentials/server_selfsigned.crt",
    "server_key": "/etc/sonic/credentials/server_selfsigned.key"
  },
  "config": {
    "allow_insecure": "true",
    "client_auth": "true",
    "log_level": "trace"
  }
}

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@kakkotetsu kakkotetsu requested a review from lguohan as a code owner March 15, 2021 03:43
@lguohan lguohan requested a review from prsunny March 17, 2021 13:12
@lguohan
Copy link
Collaborator

lguohan commented Mar 17, 2021

@prsunny, why restapi still on python2? @jleveque as well?

@jleveque
Copy link
Contributor

@prsunny, why restapi still on python2? @jleveque as well?

Good question. The restapi container is still being built upon docker-config-engine-stretch. @prsunny: Is there a reason why it isn't build upon Buster?

@prsunny
Copy link
Contributor

prsunny commented Mar 18, 2021

@sumukhatv for viz. @jleveque, @lguohan, we will plan on this and get back.

@lguohan
Copy link
Collaborator

lguohan commented Mar 27, 2021

do we need this pr as a fix?

@prsunny
Copy link
Contributor

prsunny commented Mar 29, 2021

do we need this pr as a fix?

Yes Guohan. We will plan migration to python3 separately

@prsunny prsunny merged commit e11397d into sonic-net:master Mar 30, 2021
@kakkotetsu kakkotetsu deleted the fix-restapi-startup branch March 30, 2021 21:49
daall pushed a commit that referenced this pull request Apr 22, 2021
changed from python3 to python in supervisord.conf.
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
changed from python3 to python in supervisord.conf.
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
changed from python3 to python in supervisord.conf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants