These are chat archives for allegro/ralph

31st
Aug 2015
Arkadiusz Adamski
@ar4s
Aug 31 2015 06:21
I will try check this issue on clean machine.
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 07:31
@xliiv @szok @ar4s I have the same pb on DC View, I've installed Ralph with Deb Packages, I've add a ralph user, but I don't add sample data...
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 07:37
On my firebug I just see 404 on static files on loading-bar.min.css and loading-bar.min.js
I'm on Debian Jessie 8.1
✪ vi4m Marcin Kliks
@vi4m
Aug 31 2015 07:48
@pydubreucq what build number ? dpkg -l "*ralph*"
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 07:57
3.0.0-23
✪ vi4m Marcin Kliks
@vi4m
Aug 31 2015 07:57
please upgrade this package then
try 3.0.0-26
apt-get update && apt-get install ralph-core
you should upgrade your database too, ralph migrate
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 08:00

ralph@ralph:~/ralph-core$ ralph migrate
/opt/ralph/ralph-core/lib/python3.4/site-packages/django/contrib/contenttypes/models.py:159: RemovedInDjango19Warning: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class ContentType(models.Model):

/opt/ralph/ralph-core/lib/python3.4/site-packages/django/contrib/admin/models.py:28: RemovedInDjango19Warning: Model class django.contrib.admin.models.LogEntry doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class LogEntry(models.Model):

/opt/ralph/ralph-core/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango19Warning: django.utils.importlib will be removed in Django 1.9.
return f(args, *kwds)

/opt/ralph/ralph-core/lib/python3.4/importlib/_bootstrap.py:321: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
return f(args, *kwds)

/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/models.py:85: RemovedInDjango19Warning: Model class ralph.lib.transitions.models.TransitionModel doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class TransitionModel(models.Model):

/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/models.py:96: RemovedInDjango19Warning: Model class ralph.lib.transitions.models.Transition doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class Transition(models.Model):

/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/models.py:107: RemovedInDjango19Warning: Model class ralph.lib.transitions.models.Action doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS or else was imported before its application was loaded. This will no longer be supported in Django 1.9.
class Action(models.Model):

Traceback (most recent call last):
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 220, in execute
self.errorhandler(self, exc, value)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 209, in execute
r = self._query(query)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 371, in _query
rowcount = self._do_query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 335, in _do_query
db.query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.ProgrammingError: (1146, "Table 'ralph.transitions_transitionmodel' doesn't exist")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/ralph/ralph-core/bin/ralph", line 9, in <module>
load_entry_point('ralph==3.0.0', 'console_scripts', 'ralph')()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/main.py", line 29, in prod
main('ralph.settings.prod')
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/main.py", line 14, in main
execute_from_command_line(sys.argv)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/init.py", line 312, in execute
django.setup()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/apps.py", line 17, in ready
update_models_attrs()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/models.py", line 132, in update_models_attrs
field_name=field_name
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/manager.py", line 127, in manager_method
return getattr(self.get_queryset(), name)(args, *kwargs)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/query.py", line 405, in get_or_create
return self.get(
lookup), False
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/query.py", line 328, in get
num = len(clone)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/query.py", line 144, in len
self._fetch_all()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/query.py", line 965, in _fetch_all
self._result_cache = list(self.iterator())
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/query.py", line 238, in iterator
results = compiler.execute_sql()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/utils.py", line 97, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/utils/six.py", line 658, in reraise
raise value.with_traceback(tb)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 220, in execute
self.errorhandler(self, exc, value)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 209, in execute
r = self._query(query)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 371, in _query
rowcount = self._do_query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 335, in _do_query
db.query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)

django.db.utils.ProgrammingError: (1146, "Table 'ralph.transitions_transitionmodel' doesn't exist")
the upgrade of database don't work for me
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 08:50
@vi4m do you have an idea ?
✪ vi4m Marcin Kliks
@vi4m
Aug 31 2015 08:53
investigating please wait :)
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 09:26
ok cool thanks so mutch ;)
I don't know if it's important but Ralph running when I upgrade the package
✪ vi4m Marcin Kliks
@vi4m
Aug 31 2015 09:29
you will get patch for upgrade path from 23 to 26 because we've reproduced this issue
@ar4s is testing this right now.
Arkadiusz Adamski
@ar4s
Aug 31 2015 09:30
@pydubreucq please run folowing commands (dirty solution but works):
sed -i 's/update_models_attrs()/pass #update_models_attrs()/g' /opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/apps.py
ralph migrate
sed -i 's/pass #update_models_attrs()/update_models_attrs()/g' /opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/lib/transitions/apps.py
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 09:43
It's ok I can launch Ralph
But I have a new pb when I go to DataCenter -> Hardware
I have this error

OperationalError at /data_center/datacenterasset/

(1054, "Unknown column 'assets_baseobject.content_type_id' in 'field list'")

Request Method: GET
Request URL: http://ralph.odiso.net:8000/data_center/datacenterasset/
Django Version: 1.8.4
Exception Type: OperationalError
Exception Value:

(1054, "Unknown column 'assets_baseobject.content_type_id' in 'field list'")

Exception Location: /opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py in query, line 280
Python Executable: /opt/ralph/ralph-core/bin/python
Python Version: 3.4.2
Python Path:

['/opt/ralph/ralph-core/bin',
'/opt/ralph/ralph-core/lib/python3.4',
'/opt/ralph/ralph-core/lib/python3.4/plat-x86_64-linux-gnu',
'/opt/ralph/ralph-core/lib/python3.4/lib-dynload',
'/usr/lib/python3.4',
'/usr/lib/python3.4/plat-x86_64-linux-gnu',
'/opt/ralph/ralph-core/lib/python3.4/site-packages']

Server time: Mon, 31 Aug 2015 11:43:52 +0200

On ralph's log I have a 401 on api
[31/Aug/2015 11:42:49] "GET /api/data_center/1 HTTP/1.1" 401 58
I have another error on another page like Cloud Projects, Database, VIPs, Virtual Server, IP adresses
Arkadiusz Adamski
@ar4s
Aug 31 2015 10:41
give me a sec
Arkadiusz Adamski
@ar4s
Aug 31 2015 12:33
@pydubreucq the commands below helps you to migrate data to new ralph version
wget https://www.dropbox.com/s/f5m3yqa8mnwnpp3/repair_migrations.sh
chmod +x repair_migrations.sh
cat repair_migrations.sh  # if you don't trust
./repair_migrations.sh
Arkadiusz Adamski
@ar4s
Aug 31 2015 12:42
@pydubreucq sorry for this mess, but ralph is under development and few days ago we squashed migrations
✪ vi4m Marcin Kliks
@vi4m
Aug 31 2015 13:14
so does it work?
Pierre-Yves Dubreucq
@pydubreucq
Aug 31 2015 14:59
I have this error
Operations to perform:
Apply all migrations: attachments
Running migrations:
Rendering model states... DONE
Applying attachments.0002_auto_20150818_0939... OK
Applying attachments.0003_attachment_mime_type...Traceback (most recent call last):
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 220, in execute
self.errorhandler(self, exc, value)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 209, in execute
r = self._query(query)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 371, in _query
rowcount = self._do_query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 335, in _do_query
db.query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
_mysql_exceptions.OperationalError: (1060, "Duplicate column name 'mime_type'")

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/ralph/ralph-core/bin/ralph", line 9, in <module>
load_entry_point('ralph==3.0.0', 'console_scripts', 'ralph')()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/main.py", line 29, in prod
main('ralph.settings.prod')
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/ralph/main.py", line 14, in main
execute_from_command_line(sys.argv)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/init.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(args, **cmd_options)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/base.py", line 444, in execute
output = self.handle(
args, **options)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/core/management/commands/migrate.py", line 222, in handle
executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/executor.py", line 110, in migrate
self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/executor.py", line 148, in apply_migration
state = migration.apply(state, schema_editor)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/migration.py", line 115, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/migrations/operations/fields.py", line 62, in database_forwards
field,
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/schema.py", line 43, in add_field
super(DatabaseSchemaEditor, self).add_field(model, field)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/base/schema.py", line 398, in add_field
self.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/base/schema.py", line 111, in execute
cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 79, in execute
return super(CursorDebugWrapper, self).execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/utils.py", line 97, in exit
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/utils/six.py", line 658, in reraise
raise value.with_traceback(tb)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/django/db/backends/mysql/base.py", line 124, in execute
return self.cursor.execute(query, args)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 220, in execute
self.errorhandler(self, exc, value)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 209, in execute
r = self._query(query)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 371, in _query
rowcount = self._do_query(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/cursors.py", line 335, in _do_query

(q)
File "/opt/ralph/ralph-core/lib/python3.4/site-packages/MySQLdb/connections.py", line 280, in query
_mysql.connection.query(self, query)
django.db.utils.OperationalError: (1060, "Duplicate column name 'mime_type'")
All another operation was ok (accounts, assets, back_office, data_center, licences, supports)
this pb is on attachments operation
Arkadiusz Adamski
@ar4s
Aug 31 2015 16:23
I analyzed debs 3.0.0-23 and 3.0.0-26 again - you should omit the attachments app in the script (it's my mistake :worried: - I am sorry for that)
please comment line from 5 to 15 line and run again