-
Notifications
You must be signed in to change notification settings - Fork 1.8k
multiDB : add database_config.json into vs images #3757
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| { | ||
| "INSTANCES": { | ||
| "redis":{ | ||
| "hostname" : "127.0.0.1", | ||
| "port" : 6379, | ||
| "unix_socket_path" : "/var/run/redis/redis.sock" | ||
| } | ||
| }, | ||
| "DATABASES" : { | ||
| "APPL_DB" : { | ||
| "id" : 0, | ||
| "separator": ":", | ||
| "instance" : "redis" | ||
| }, | ||
| "ASIC_DB" : { | ||
| "id" : 1, | ||
| "separator": ":", | ||
| "instance" : "redis" | ||
| }, | ||
| "COUNTERS_DB" : { | ||
| "id" : 2, | ||
| "separator": ":", | ||
| "instance" : "redis" | ||
| }, | ||
| "LOGLEVEL_DB" : { | ||
| "id" : 3, | ||
| "separator": ":", | ||
| "instance" : "redis" | ||
| }, | ||
| "CONFIG_DB" : { | ||
| "id" : 4, | ||
| "separator": "|", | ||
| "instance" : "redis" | ||
| }, | ||
| "PFC_WD_DB" : { | ||
| "id" : 5, | ||
| "separator": ":", | ||
| "instance" : "redis" | ||
| }, | ||
| "FLEX_COUNTER_DB" : { | ||
| "id" : 5, | ||
| "separator": ":", | ||
| "instance" : "redis" | ||
| }, | ||
| "STATE_DB" : { | ||
| "id" : 6, | ||
| "separator": "|", | ||
| "instance" : "redis" | ||
| }, | ||
| "SNMP_OVERLAY_DB" : { | ||
| "id" : 7, | ||
| "separator": "|", | ||
| "instance" : "redis" | ||
| } | ||
| }, | ||
| "VERSION" : "1.0" | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,7 +29,8 @@ rm -f /var/run/rsyslogd.pid | |
|
|
||
| supervisorctl start rsyslogd | ||
|
|
||
| mkdir -p /var/run/redis | ||
| mkdir -p /var/run/redis/sonic-db | ||
| cp /etc/default/sonic-db/database_config.json /var/run/redis/sonic-db/ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
redis-server is not reading this file right now. #Pending
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. Let's replace the core C++ APIs and redis-cli scripts first. Then I'll go back to change the vs images redis-server stuff. For now , this change only make sure the vs tests are not broken when doing the replacement.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is still applicable. If I unblock now, it will be forgotten easily. In reply to: 346558103 [](ancestors = 346558103)
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can open an issue and assign it to me for reminder, at this moment I don't want to do this part first. Later when we change the vs tests, this is a must do stuff, it cannot be forgotten.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd like to finish the core stuff first(those APIs in swss and redis-cli replacement), then the image can be run on DUT and we can start testing on local . After that we can focus on vs tests. |
||
|
|
||
| supervisorctl start redis-server | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you add
#Pending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need add VOULME again, it already added when we start the dvs in conftest.py.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dockerfile
VOLUMEis different fromdocker run -v. If you mark it asVOLUME, anything already there (built into docker image) will be copied out to host when you mount. I believe this is useful in some test cases. #ClosedThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can verify and use this VOLUME MODE later. For now, there is nothing in /var/run/redis/ built into docker image. And today we only use this /var/run/redis after docker image is running. I prefer not to change current behavior which is not related to multiDB changes.