These are chat archives for allegro/ralph

23rd
Nov 2018
Adam
@tretos53
Nov 23 2018 09:50
@vi4m
dpkg -l "ralph-*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                         Version                     Architecture                Description
+++-============================================-===========================-===========================-=============================================================================================
ii  ralph-cli                                    0.3.0                       amd64                       ?
ii  ralph-core                                   3.0.0-snapshot-20170822-825 amd64                       Ralph is an DCIM/CMDB - asset management for Data Centers/ Back Office.
The first screenshot (with circles). On that page I only got two circles but 6 data centres
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 10:30
This is one year old version (2017)
Adam
@tretos53
Nov 23 2018 10:31
Is there an easy way to upgrade, keeping the existing data ?
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 10:31
I would recommend to make side copy(if it’s VM), and try to upgrade the package on this copy
And copy of database
Since it’s major upgrade
If it runs without problems, you can upgrade production
apt-get upgrade ralph-core
Adam
@tretos53
Nov 23 2018 10:33
I can take a snapshot of the vm easily and revert back if needed
Thanks
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 10:42
Remember about database to copy as well
Adam
@tretos53
Nov 23 2018 10:43
I'ts on the same vm so it'll be part of the snapshot
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 10:44
Ok
Adam
@tretos53
Nov 23 2018 10:47
Got ImportError: No module named 'statsd' I google that allegro/ralph#3154
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 10:55
Which version is installed now ?
Adam
@tretos53
Nov 23 2018 10:55
dpkg -l "ralph-*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                         Version                     Architecture                Description
+++-============================================-===========================-===========================-=============================================================================================
ii  ralph-cli                                    0.3.0                       amd64                       ?
iF  ralph-core                                   3.0.0-snapshot-20181116-896 amd64                       Ralph is an DCIM/CMDB - asset management for Data Centers/ Back Office.
Adam
@tretos53
Nov 23 2018 11:05
When doing ralph runserver 0.0.0.0:8000 I've got ImportError: No module named 'statsd'
Adam
@tretos53
Nov 23 2018 11:43

fixed that part but now I've got

You have unapplied migrations; your app may not work properly until they are applied.
Run 'python manage.py migrate' to apply them.

Where do I find manage.py ?

✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:08
well, we have to deal with this missing import first, then it will work out
let me ask @ar4s about that
Adam
@tretos53
Nov 23 2018 14:10
@vi4m I fixed the import by doing below (not sure if correctly)
root@localhost:/home/administrator# source /opt/ralph/ralph-core/bin/activate
(ralph-core) root@localhost:/home/administrator# pip install statsd
Collecting statsd
  Downloading https://files.pythonhosted.org/packages/47/33/c824f799128dfcfce2142f18d9bc6c55c46a939f6e4250639134222d99eb/statsd-3.3.0-py2.py3-none-any.whl
Installing collected packages: statsd
Successfully installed statsd-3.3.0
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:15
yes, it's correct
in meantime, we're fixing new build to include statsd package
Adam
@tretos53
Nov 23 2018 14:17
Is there any way to fix "unapplied migrations" in the meantime or should I restore the vm and wait for the fix?
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:17
it's normal to see this message, the next upgrade step is to run:
ralph migrate
Adam
@tretos53
Nov 23 2018 14:17
let me try
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:18
it will apply a lot of changes to the database, so make sure the backup is done
Adam
@tretos53
Nov 23 2018 14:19
ok
all OK
Operations to perform:
  Synchronize unmigrated apps: import_export, foundation, messages, hooks, notifications, staticfiles, rest_framework, ralph_admin, humanize, mptt, dc_view, permissions, table, taggit_serializer, django_rq
  Apply all migrations: assets, sessions, virtual, domains, transitions, authtoken, back_office, taggit, dhcp, reports, auth, licences, external_services, attachments, networks, data_center, trade_marks, security, supports, operations, dashboards, data_importer, deployment, configuration_management, custom_fields, contenttypes, accounts, reversion, sitetree, ssl_certificates, admin
Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
Running migrations:
  Rendering model states... DONE
  Applying accounts.0006_remove_ralphuser_gender... OK
  Applying assets.0028_auto_20180730_1135... OK
  Applying back_office.0007_auto_20180105_0910... OK
  Applying back_office.0008_auto_20180801_1157... OK
  Applying back_office.0009_auto_20181016_1252... OK
  Applying configuration_management.0003_scmstatuscheck_ok... OK
  Applying dashboards.0003_graph_push_to_statsd... OK
  Applying dashboards.0004_auto_20170926_1547... OK
  Applying dashboards.0005_auto_20170927_1505... OK
  Applying dashboards.0006_auto_20171221_0959... OK
  Applying deployment.0005_auto_20180625_1257... OK
  Applying dhcp.0004_add_dns_server_group... OK
  Applying dhcp.0005_change_related_name... OK
  Applying dhcp.0006_remove_dnsserver_is_default... OK
  Applying domains.0006_auto_20180725_1216... OK
  Applying licences.0004_licence_depreciation_rate... OK
  Applying networks.0011_add_dns_servers_group... OK
  Applying networks.0012_remove_network_dns_servers... OK
  Applying networks.0013_auto_20171006_0947... OK
  Applying networks.0014_auto_20171009_1030... OK
  Applying security.0008_vulnerability_display_name... OK
  Applying ssl_certificates.0001_initial... OK
  Applying ssl_certificates.0002_auto_20180522_1244... OK
  Applying ssl_certificates.0003_remove_sslcertificate_service_environment... OK
  Applying trade_marks.0001_initial... OK
  Applying trade_marks.0002_auto_20181005_1446... OK
  Applying transitions.0007_transition_template_name... OK
  Applying transitions.0008_auto_20171211_1300... OK
  Applying transitions.0009_transition_success_url... OK
  Applying virtual.0010_auto_20181018_0822... OK
Adam
@tretos53
Nov 23 2018 14:27
Ralph is now working but the issue is still there. Showing only two DCs instead of 6. Removed names from below screenshot
image.png
Also one of the graphs I created earlier (which I dont use) is causing below error:
KeyError at /dashboards/graph/2/
'series'
Request Method:    GET
...
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:31
i'm happy that your 50-versions old ralph installation upgraded relatively smoothly :) now, let's look at this simple bug you mentioned :)
Adam
@tretos53
Nov 23 2018 14:31
:D
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:42
could you purge cache in your browser?
from your image, it seems you have 2 Data Centers
and what do you see when you enter menu -> Data Center -> Visualization ?
Adam
@tretos53
Nov 23 2018 14:49
I cleared everything from Firefox and IE and results below:
same in bohth browsers
image.png
image.png
Names removed
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 14:52
Zrzut ekranu 2018-11-23 o 15.52.03.png
Menu -> Data centers - check if checked
Adam
@tretos53
Nov 23 2018 15:01
Yes, all have Show on dashboard ticked
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 15:23
i have some clue
you have to add at least 1 rack to the server room and 2)
You have to check "require position" on each rack you want to count in visualization
Adam
@tretos53
Nov 23 2018 15:25
Let me check
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 15:25
and then it will work :)
Adam
@tretos53
Nov 23 2018 15:30
It did! Thanks :D
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 15:30
hurray
Adam
@tretos53
Nov 23 2018 15:33
ok, to the next problem (not urgent). When I click on one of the graphs I got a Yellow screen of death and there is no option to remove the graph. ANy ideas? I'll DM you the error message as it's too long
✪ vi4m Marcin Kliks
@vi4m
Nov 23 2018 20:25
I reported that to @ar4s
will look at this on Monday
which one of graph is it? Do the rest of graphs work fine?