Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/vs/docker-sonic-vs/Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ COPY ["files/configdb-load.sh", "/usr/bin/"]
COPY ["files/arp_update", "/usr/bin/"]
COPY ["files/buffers_config.j2", "files/qos_config.j2", "/usr/share/sonic/templates/"]
COPY ["files/sonic_version.yml", "/etc/sonic/"]
COPY ["database_config.json", "/etc/default/sonic-db/"]

# Workaround the tcpdump issue
Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Nov 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you add

VOLUME /var/run/redis/sonic-db/

#Pending

Copy link
Copy Markdown
Collaborator Author

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.

Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Nov 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dockerfile VOLUME is different from docker run -v. If you mark it as VOLUME, 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. #Closed

Copy link
Copy Markdown
Collaborator Author

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.

RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
Expand Down
57 changes: 57 additions & 0 deletions platform/vs/docker-sonic-vs/database_config.json
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"
}
3 changes: 2 additions & 1 deletion platform/vs/docker-sonic-vs/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Copy link
Copy Markdown
Collaborator

@qiluo-msft qiluo-msft Nov 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

database_config.json [](start = 25, length = 20)

redis-server is not reading this file right now. #Pending

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The 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)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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

Expand Down