/srv/irclogs.ubuntu.com/2017/08/01/#juju.txt

=== pip is now known as Guest19552
Guest19552tas02:15
=== frankban|afk is now known as frankban
digvwhich Minimum Kernel should I choose if I want 4.4.* kernel for charm deployment?11:06
=== mup_ is now known as mup
=== frankban is now known as frankban|afk
=== beisner_ is now known as beisner
=== zeus is now known as Guest47987
=== rick_h changed the topic of #juju to: Juju as a Service Beta now available at https://jujucharms.com/jaas | https://review.jujucharms.com/ | https://jujucharms.com/docs/ | http://goo.gl/MsNu4I || https://www.youtube.com/c/jujucharms
skayI have a django app deployed with a really old inscrutable juju charm. I'm in the process of upgrading the django app so that it uses native django migrations instead of south migrations20:24
skaythis means that on initial deployment of the upgraded stuff, I need to run a migration with --fake20:24
skayI'm not sure how to have that happen with a charm, much less an old inscrutable one20:25
skaysubsequent deployments would just call migrate20:25
mat128skay: identify which table native django migrations use and make sure they state what django expects so that it doesnt upgrade them again20:49
skaymat128: er, native django migrations run against the same tables that the south migrations ran against. https://docs.djangoproject.com/en/1.7/topics/migrations/#upgrading-from-south20:51
mat128skay: so I assume running "django migrate" on top of your existing database (run it against a copy first!) will simply no-op, right?20:51
mat128in that case what is the problem?20:52
skaymat128: like the link says, we have to run --fake due to reasons20:53
skaymat128: indeed I have been testing against a copy of the database while doing all of this20:53
mat128skay: My best bet would be to run the django migrate --fake outside of your charm20:54
mat128I assume it only marks all migrations as "done"20:54
mat128skay: are you running into the circular foreign keys?20:55
skaymat128: I was hoping to run it outside the charm, but due to the way the charm is written, it only grabs the updated src from the django app when the upgrade-charm command is called. this means that I can't run a management command by hand with teh new src20:56
mat128juju ssh?20:56
skaymat128: not sure if it was the circular foreign keys that caused the problem, but I think so20:56
mat128skay: the guide mentions running with --fake only on circular keys issues, otherwise it's a straightforward upgrade20:56
skayjuju ssh is no good. what the charm does on upgrade is to get a tarball of the latest version of the app... so, the new code won't be on the unit before a charm upgrade is called20:57
skayit is not how I'd write a charm, but it's what I have to work with20:57
mat128can you edit it somehow?20:58
skayI think changing the charm would be tantamount to writing a new one20:58
mat128skay: a different approach would be to look at what --fake does (maybe run it locally and see?) and just import that data back into the database20:58
skaythat's an interesting idea20:59
mat128make sure you run it for the right version of the app though20:59
skaymat128: thanks for the thoughts21:00
mat128np, good luck with your project :)21:01
skayit's a doozy. I want to do the minimal amount to get me to django LTS and keep running in to things where I want to rewrite the charm, etc.21:02
=== Guest47987 is now known as zeus`
=== zeus` is now known as zeus

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!