Giter VIP home page Giter VIP logo

testmigration's People

Contributors

rkhamis avatar

Watchers

 avatar

testmigration's Issues

export tool

create a jumpscript which exports all relevant OSIS objects to YAML nicely structured in a directory layout

cbroker & vfw

use subdirectory structure

space

  • machine
  • ...
    cpunode
  • ...???

...

be logical info only once

this will be used as backup but also to see how data changed over time
will be put in coderepo

create sentry client

jumpscale extension in libs repo

use postgresql db as source of data

create methods to find events, get event, delete events based on certain criteria

jsgrid disablenode does not work, tries to delete node from grid

(JSBOX)root@admin1:~# jsgrid disablenode -nid 10
sandbox:/opt/jsbox
ERROR
list indices must be integers, not str
Traceback (most recent call last):
~ File "/opt/jsbox/tools/jsgrid", line 279, in
_deleteNode(node)
~ File "/opt/jsbox/tools/jsgrid", line 179, in _deleteNode
nid = node['id']
~ TypeError: list indices must be integers, not str

type/level: UNKNOWN/critical
TypeError: list indices must be integers, not str

need jpackage update command

which goes over all installed jpackages, checks if buildnr changed, if so do an install (so really acts like update)

can't search accounts with special characters

In [9]: cl = j.core.osis.getClient(user='root')

In [10]: accounts = acclient.simpleSearch({'name': '[email protected]'})

In [11]: acclient.get(45)
Out[11]:
{
"_ckey": "",
"_meta": [
"osismodel",
"cloudbroker",
"account",
1
],
"acl": [
{
"guid": "",
"right": "CXDRAU",
"type": "U",
"userGroupId": "[email protected]"
}
],
"guid": 45,
"id": 45,
"name": "[email protected]"
}

In [12]: accounts = acclient.simpleSearch({'name': '[email protected]'})

In [13]: acclient.simpleSearch({'name': '[email protected]'})
Out[13]: []

over view page needs much better

make new graphs (these are fake)

  • show nr of vmachines
  • show nr of cpu nodes
  • show nr of accounts/spaces
  • status of health but now not layout nice

caching headers, set css, js as must validate

as we do updates regularly, can we make sure the portal and the proxy are avoiding caching, this can be done by finetuning the caching headers

apache example:

<filesMatch ".(css|js|pdf)$">
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"

check gridportal can be used to identify cpu resource contraints

  • document how to use gridportal to identify cpu resource issues
  • create new page & macro to show CPU usage per cpu and fw node
    ** show in 1 page, this allows us to see immediate which cpu/fw node is overloaded
    ** cpu usage means context switches (define danger zone) & cpu usage
    ** the 1 page lists all cpu/fw nodes & their cpu status
  • there should be a page per compute node which shows cpu usage per VM
    ** is not the main page of the compute node, its a 2nd one only called when user wants to troubleshoot resource utilization
    ** lists all vm's & their used mem,cpu,bandwidth? ... whatever relevant to see resource used
  • info comes from graphite or our aggregator or osis (we have multiple locations with this info)
  • check that our monitoring is working properly
    ...

jsuser should work cross environment

Users could be created cross grid regardeless they should be changeable on both grids.

Eg. create user Jo on lenoir2 key == 400_jo
change him om york1 key == 301_jo things dont work

Osis client barfs on special characters

Run on cb1.york1.vscalers.com:

{code}
In [2]: cl = j.core.osis.getClient(user='root')

In [6]: vmcl = j.core.osis.getClientForCategory(cl, 'cloudbroker', 'vmachine')

In [7]: vmcl.get(357)
SPECPATH:/opt/jsbox_data/var/code/osis/cloudbroker/model.spec
getOsisModelClass: cloudbroker_vmachine
Out[7]: ---------------------------------------------------------------------------
UnicodeEncodeError Traceback (most recent call last)
/root/cloudbroker_shell in ()
----> 1 vmcl.get(357)

/opt/jsbox/lib/IPython/core/displayhook.pyc in call(self, result)
236 self.start_displayhook()
237 self.write_output_prompt()
--> 238 format_dict = self.compute_format_data(result)
239 self.write_format_data(format_dict)
240 self.update_user_ns(result)

/opt/jsbox/lib/IPython/core/displayhook.pyc in compute_format_data(self, result)
148 MIME type representation of the object.
149 """
--> 150 return self.shell.display_formatter.format(result)
151
152 def write_format_data(self, format_dict):

/opt/jsbox/lib/IPython/core/formatters.pyc in format(self, obj, include, exclude)
124 continue
125 try:
--> 126 data = formatter(obj)
127 except:
128 # FIXME: log the exception

/opt/jsbox/lib/IPython/core/formatters.pyc in call(self, obj)
445 type_pprinters=self.type_printers,
446 deferred_pprinters=self.deferred_printers)
--> 447 printer.pretty(obj)
448 printer.flush()
449 return stream.getvalue()

/opt/jsbox/lib/IPython/lib/pretty.pyc in pretty(self, obj)
358 if callable(meth):
359 return meth(obj, self, cycle)
--> 360 return _default_pprint(obj, self, cycle)
361 finally:
362 self.end_group()

/opt/jsbox/lib/IPython/lib/pretty.pyc in _default_pprint(obj, p, cycle)
478 if getattr(klass, 'repr', None) not in _baseclass_reprs:
479 # A user-provided repr.
--> 480 p.text(repr(obj))
481 return
482 p.begin_group(1, '<')

UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 423: ordinal not in range(128)

In [8]:
{code}

osis needs redisfix

/opt/jsbox/apps/redis/redis-check-aof --fix /opt/jsbox_data/var/redis/redism/db/appendonly.aof

check redis is running is not cost effective

5 jumpscale:processmanager 14:58:46: exec:netstat -ntulp | grep ':7768 '
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:netstat -ntulp | grep ':7766 '
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:netstat -ntulp | grep ':7767 '
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:netstat -ntulp | grep ':7769 '
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef
5 jumpscale:processmanager 14:58:46: exec:env COLUMNS=300 ps -ef

create macro alert

see
file:///opt/jumpscale/apps/gridportal/base/Grid/.macros/wiki/alert/1_alert.py
get info out of redis

see file:///opt/jumpscale/apps/watchdogmanager/populate_redis_test.py
to see how redis is used

needs to work together with
file:///opt/jumpscale/apps/gridportal/base/Grid/.macros/wiki/alerts/1_alerts.py
make sure alerts is working as well

to run locally do first the populate_redis_test
then run
file:///opt/jumpscale/apps/watchdogmanager/watchdogManager.py
to have alerts

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.