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

Hardcoded Redis socket path #51

Open
lool opened this issue Feb 3, 2017 · 4 comments
Open

Hardcoded Redis socket path #51

lool opened this issue Feb 3, 2017 · 4 comments
Assignees

Comments

@lool
Copy link

lool commented Feb 3, 2017

Hi,

While working on a SONiC snap, I hit the hardcoded path to the Redis unix socket. It's defined in header files at build time and ends up in a number of daemons (syncd etc.) and libs (libsairedis). This makes it impractical to relocate SONiC, to have multiple versions of it on the same box or to integrate into a different FS layout.

It would be nice to have a runtime override for the path, either an environment variable (SONIC_REDIS_URL?) or a command-line flag that would have to be passed to each program using Redis (--redis-url).

Thanks,
-- Loïc Minier

@lool
Copy link
Author

lool commented Feb 3, 2017

This is the workaround I'm currently using; I'm binary patching syncd, libsairedis etc. with this sed snippet:
sed -i 's#/var/run/redis/redis\.sock#link-to-redis-socket.sock#g' syncd
and then I create a symlink from the current directory before launching syncd/other daemons:
ln -s /actual/path/to/redis.sock link-to-redis-socket.sock

@lool
Copy link
Author

lool commented Feb 3, 2017

(NB: link-to-redis-socket.sock is the exact same length as the original string)

@lguohan
Copy link
Contributor

lguohan commented Mar 15, 2017

@qiluo-msft
Copy link
Contributor

Agree. I will work on it later.

michaelli10 pushed a commit to michaelli10/SONiC that referenced this issue May 23, 2020
…t-doc

Add details about D-Bus architecture (container to host).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants