Coder Social home page Coder Social logo

contrail-server-manager's Introduction

contrail-server-manager

contrail server management

This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Overview

Contrail Server Manager repo contains code that facilitates management of servers in a contrail cluster. It provides functions to install base OS on servers (reimaging), and configuring the servers by installing necessary packages, configuring and starting different services needed to provide a contrail role functionality on these servers (provisioning). Contrail server manager uses other widely deployed tools such as cobbler and puppet to accomplish the task of reimaging and provisioning.

Summary, server manager includes Openstack and Contrail installation and provisioning and lifecycle management of each node in a contrail cluster. More details on this feature is described here. http://juni.pr/1nHLtCB.

contrail-server-manager's People

Contributors

abhansali-juniper avatar ajoshi9 avatar ananth-at-camphor-networks avatar andrey-mp avatar chandanjuniper avatar cijohnson avatar dgautam avatar kamleshp avatar kirankn80 avatar krharsh avatar miriyalar avatar mkheni avatar npchandran avatar pbharat avatar pcarver avatar ramprackash avatar ritamganguly avatar sgurumurthy avatar shajuvk avatar srinivn avatar thilakrajs avatar vmahuli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

contrail-server-manager's Issues

Inproper use of try/except

Hi!

Currently many function bodies are wrapped in something like this:

def do_something(params):
    try:
         #some code
    except Exception as e:
        raise e

This is really bad because you are loosing tracback frames so it gets very hard to debug problems.
For example if you do not provide IPMI address you end with something like this:

2014-12-16 16:06:53,073 - SMGR - DEBUG - reimage_server
2014-12-16 16:06:53,158 - SMGR - DEBUG - *****TRACEBACK-START*****
2014-12-16 16:06:53,159 - SMGR - DEBUG - Traceback (most recent call last):

2014-12-16 16:06:53,159 - SMGR - DEBUG -   File "/opt/contrail/server_manager/server_mgr_main.py", line 2073, in reimage_server
    base_image, package_image_id, reimage_parameters)

2014-12-16 16:06:53,159 - SMGR - DEBUG -   File "/opt/contrail/server_manager/server_mgr_main.py", line 2924, in _do_reimage_server
    raise e

2014-12-16 16:06:53,159 - SMGR - DEBUG - TypeError: cannot marshal None unless allow_none is enabled

2014-12-16 16:06:53,159 - SMGR - DEBUG - *****TRACEBACK-END******

If I remove unnecessary try/except statements (in this case in create_system method of ServerMgrCobbler class) I get:

2014-12-16 16:24:34,888 - SMGR - DEBUG - reimage_server
2014-12-16 16:24:34,907 - SMGR - DEBUG - *****TRACEBACK-START*****
2014-12-16 16:24:34,915 - SMGR - DEBUG - Traceback (most recent call last):

2014-12-16 16:24:34,915 - SMGR - DEBUG -   File "/opt/contrail/server_manager/server_mgr_main.py", line 2073, in reimage_server
    base_image, package_image_id, reimage_parameters)

2014-12-16 16:24:34,915 - SMGR - DEBUG -   File "/opt/contrail/server_manager/server_mgr_main.py", line 2907, in _do_reimage_server
    reimage_parameters.get('partition', ''))

2014-12-16 16:24:34,915 - SMGR - DEBUG -   File "/opt/contrail/server_manager/server_mgr_cobbler.py", line 264, in create_system
    system_id, "power_address", power_address, self._token)

2014-12-16 16:24:34,916 - SMGR - DEBUG -   File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)

2014-12-16 16:24:34,916 - SMGR - DEBUG -   File "/usr/lib/python2.7/xmlrpclib.py", line 1572, in __request
    allow_none=self.__allow_none)

2014-12-16 16:24:34,916 - SMGR - DEBUG -   File "/usr/lib/python2.7/xmlrpclib.py", line 1085, in dumps
    data = m.dumps(params)

2014-12-16 16:24:34,916 - SMGR - DEBUG -   File "/usr/lib/python2.7/xmlrpclib.py", line 632, in dumps
    dump(v, write)

2014-12-16 16:24:34,916 - SMGR - DEBUG -   File "/usr/lib/python2.7/xmlrpclib.py", line 654, in __dump
    f(self, value, write)

2014-12-16 16:24:34,916 - SMGR - DEBUG -   File "/usr/lib/python2.7/xmlrpclib.py", line 658, in dump_nil
    raise TypeError, "cannot marshal None unless allow_none is enabled"

2014-12-16 16:24:34,916 - SMGR - DEBUG - TypeError: cannot marshal None unless allow_none is enabled

2014-12-16 16:24:34,916 - SMGR - DEBUG - *****TRACEBACK-END******

Now it's clear that the there is a problem with power_address.

Server manager should set pxe as "next boot" before actually rebooting the node

For server manager to reimage a node we need to change the boot priority on the host by setting pxe boot as the first priority.

This manual step can be avoided if we can set the one time boot to pxe before cobbler starts reimaging the node. Suggestion :

add the below code to def _power_cycle_servers in /opt/contrail/server_manager/server_mgr_main.py

7348 if server['ipmi_address']:
7349 db_servers = self._serverDb.get_server(
7350 {"id" : server['id']},
7351 None, True)
7352 #import pdb;pdb.set_trace()
7353 cmd = "ipmitool -I lanplus -U %s -P %s -H %s chassis bootdev pxe" % (db_servers[0]['ipmi_username'],db_servers[0]['ipmi_password'],db_servers[0]['ipmi _address'])
7354 subprocess.check_call(cmd, shell=True)
7355 power_reboot_list.append(
7356 server['id'])

Problem during installation of contrail server manager version 4

hello ,

i tried many times to install server manager on fresh install ubuntu 14.04.04 or 16.04.02 with no luck ...

I deleted the content of sources.list as mentionned in the wiki and the sources.list.d does not contain any pointer to external repos.

in the install log file , i can see that there is an error regarding PGP key absent at some point after downloading/ installing some packages and then the install simply stop .

can you help ?

regards

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.