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

SONiC Management Framework Release 1.0 #659

Merged
merged 7 commits into from
Nov 14, 2019

Conversation

PrabhuSreenivasan
Copy link
Contributor

@PrabhuSreenivasan PrabhuSreenivasan commented Sep 19, 2019

SONiC Management Framework Release 1.0

-Combined development from Broadcom and Dell
-Adds support for CLI, REST and GNMI interfaces
-YANG based data modeling
-Schema and syntax validation for Redis DB data using CVL
-written in GO programming language

Added helper scripts syspoll and syseeprom-to-json to poll system data and convert syseeprom data to JSON format.

Howard Persh and others added 7 commits July 12, 2019 10:34
Scripts to provide the files /var/platform/syseeprom and /var/paltform/system,
which are JSON files read by CLI commands, to provide system information.

Signed-off-by: Howard Persh <[email protected]>
Added utilities to populate system eeprom and system info for management framework to support openconfig platform and system components
Merging latest changes from Azure
scripts/syspoll Show resolved Hide resolved
f.close()
os.rename(tmpfile, outfile)

time.sleep(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this sleep for?

Copy link
Contributor

Choose a reason for hiding this comment

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

To update the output file once per second.

@@ -0,0 +1,31 @@
#!/usr/bin/awk -f
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please explain, how is this used?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a utility to convert the text output of the syseeprom dump utility into JSON.


ticks_per_sec = os.sysconf(os.sysconf_names['SC_CLK_TCK'])

while True:
Copy link
Contributor

Choose a reason for hiding this comment

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

I see it as a pretty handy tool to collect all info in human readable format.

Can you help us understand the use case of keeping a file in sync with system state, by running every second ?

[Sorry for the delay. The comments from other PR drowned the rest :-) ]

Copy link
Contributor

Choose a reason for hiding this comment

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

This was the initial implementation of a back-end for a CLI command to show system status -- the front-end would simply read a known file, which is constantly updated by this back-end daemon.
I would say that, one day soon, the redis DB should be used, and be updated by the daemon, rather than a file.

@renukamanavalan renukamanavalan merged commit e0e8c2f into sonic-net:master Nov 14, 2019
Copy link
Contributor

@jleveque jleveque left a comment

Choose a reason for hiding this comment

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

The sonic-utilities repo is intended for command-line utilities (short-lived applications which will be run by a human at the command line. This repo is not intended to house daemons. Daemons should reside in the sonic-buildimage repo, where the can be installed and managed as services. I suggest that this PR be reverted and the file locations be reconsidered.

@renukamanavalan
Copy link
Contributor

Hi Howard,
Based on Joe's comments, let me revert this. Can you please raise a PR for sonic-buildimage repo?
Thank you,
Renuka

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants