GithubHelp home page GithubHelp logo

quattor / ncm-query Goto Github PK

View Code? Open in Web Editor NEW
1.0 24.0 5.0 162 KB

Node Configuration Manager CLI for Querying Profile

Home Page: www.quattor.org

License: Other

Perl 86.57% Shell 12.47% Raku 0.96%

ncm-query's Introduction

ncm-query

Build Status

Front end for querying the NCM profile configuration

Basic usages:

ncm-query --component <component>
ncm-query /some/path
ncm-query --list

ncm-query's People

Contributors

jouvin avatar jrha avatar ned21 avatar piojo avatar piojo-zz avatar stdweird avatar ttys4 avatar wpoely86 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ncm-query's Issues

ncm-query may only be run as root even if the profile is readable by the user

Removing the restriction causes an exception when trying to open a file:

Uncaught exception!!! Calling stack is:
  LC::Exception::throw_error called at /opt/edg/lib/perl/EDG/WP4/CCM/Configuration.pm line 141
  EDG::WP4::CCM::Configuration::_create_pid_file called at /opt/edg/lib/perl/EDG/WP4/CCM/Configuration.pm line 105
  EDG::WP4::CCM::Configuration::new called at /opt/edg/lib/perl/EDG/WP4/CCM/CacheManager.pm line 221
  EDG::WP4::CCM::CacheManager::_getConfig called at /opt/edg/lib/perl/EDG/WP4/CCM/CacheManager.pm line 165
  EDG::WP4::CCM::CacheManager::getUnlockedConfiguration called at bin/ncm-query line 231
  query::setCCMConfig called at bin/ncm-query line 409
*** _touch_file(/var/lib/ccm/profile.33/ccm-active-profile.33-13892): open (/var/lib/ccm/profile.33/ccm-active-profile.33-13892): Permission denied
Uncaught exception!!! Calling stack is:
  LC::Exception::throw_error called at bin/ncm-query line 233
  query::setCCMConfig called at bin/ncm-query line 409
*** cannot get configuration via CCM

ncm-query to support different output formats

Sometimes it is necessary for programs to run ncm-query directly to lookup information in the current host profile. Unfortunately, the output of ncm-query is not so easy for a computer to parse.

The contents of a host profile are easy to get hold of from within an NCM component, but problematic when running a tool that is not an NCM component.

I suggest there are multiple ways of tackling this, and we might provide all of them:

  • ncm-query --format native that outputs the profile, or portions of the profile, in whatever the native format is (XML or JSON, depending on what is being used).
  • ncm-query --format json that outputs the profile, or portions thereof, in JSON.
  • ncm-query --format xml for XML format.
  • ncm-query --format yaml for YAML format.
  • Perl API that allows a non-NCM component to get hold of a configuration hash similar to that passed through to the Configure subroutine in an NCM component (this isn't an ncm-query issue, but I thought I'd put it here to keep things all together for discussion at first).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.