IRC logs for #aegir, 2017-02-06 (GMT)

2017-02-05
2017-02-07
TimeNickMessage
[18:21:12]* boshtian has joined #aegir
[18:53:41]* ybabel has joined #aegir
[20:13:45]* reaper013 has joined #aegir
[21:21:40]* reaper013 has quit (Ping timeout: 260 seconds)
[22:27:26]* mollux1 has joined #aegir
[23:30:46]* reaper013 has joined #aegir
[23:30:50]<reaper013>Hello
[23:31:05]<reaper013>I am trying to provide a patch for https://www.drupal.org/node/1279550
[23:31:06]<hefring>https://www.drupal.org/node/1279550 => D8 multi-language update during installation [#1279550] => 4 comments, 1 IRC mention
[23:31:37]<reaper013>Is it possible to execute code from Drupal 8 when building the site install form?
[23:32:20]<reaper013>In drupal8/core/lib/Drupal/Core/Installer/Form/SelectLanguageForm.php
[23:32:26]<reaper013>$standard_languages = LanguageManager::getStandardLanguageList();
[00:13:58]* noecc has joined #aegir
[00:38:37]* v20th has joined #aegir
[01:18:47]* mstenta has joined #aegir
[02:30:34]* hefring has joined #aegir
[02:48:54]* reaper013 has quit (Quit: Page closed)
[02:49:20]* shaneonabike1 has joined #aegir
[03:06:12]* mollux2 has joined #aegir
[03:09:58]* mollux1 has quit (Ping timeout: 255 seconds)
[03:30:26]* boshtian has quit (Ping timeout: 256 seconds)
[03:52:39]* mollux2 has quit (Quit: Leaving.)
[05:05:35]* noecc has quit (Ping timeout: 240 seconds)
[05:37:08]* mstenta has quit (Ping timeout: 276 seconds)
[06:01:21]* boshtian has joined #aegir
[06:05:18]* noecc has joined #aegir
[07:37:22]* helmo42[m] has joined #aegir
[08:19:42]* ybabel has quit (Quit: ybabel)
[08:22:18]* roycroft has joined #aegir
[08:22:35]<roycroft>hi folks
[08:22:52]<roycroft>i am kind of lost again, as is my wont concerning things aegirish
[08:23:09]<roycroft>i am attempting to migrate an aegir-managed site to a new server
[08:23:18]<roycroft>i added the server
[08:23:20]<roycroft>verified it
[08:23:25]<roycroft>all is well there
[08:23:35]<roycroft>then i went to the site i was going to migrate and disabled it
[08:23:44]<roycroft>and then tried migrating it
[08:23:45]<roycroft>it failed
[08:24:00]<roycroft>the critical error is:
[08:24:02]<roycroft>The version of the media module found on this platform (7226) has a lower Schema version than the one the site has installed (7227)
[08:24:07]<ergonlogic>roycroft: you built a new platform on the new server?
[08:24:13]<roycroft>no
[08:24:26]<roycroft>i thought aegir would move the platform for me
[08:24:30]<ergonlogic>so, you're talking about a new db server?
[08:24:32]<roycroft>yes
[08:24:36]<roycroft>a new db and http server
[08:25:02]<ergonlogic>ok, so you shouldn't be able to specify the http server directly when migrating
[08:25:07]<roycroft>quick backstory
[08:25:15]<roycroft>this is a "politically active" website
[08:25:19]<roycroft>that has been taking ddos attacks
[08:25:40]<roycroft>so i'm trying to spin it off on its own vm so as to ameliorate the effects of the ddos attacks to other sites
[08:26:06]<roycroft>i created a new server
[08:26:15]<ergonlogic>you added the server, and enabled the http and db services?
[08:26:17]<roycroft>told it to do both web and db
[08:26:21]<roycroft>verified it
[08:26:48]<roycroft>now here's something that is different, but i shouldn't tihink it would affect the site i'm migrating
[08:26:56]<roycroft>the current server has https enabled
[08:26:59]<roycroft>the new one does not
[08:27:03]<roycroft>but the site does not use https
[08:27:15]<ergonlogic>that shouldn't affect it
[08:27:20]<roycroft>i didn't think so
[08:27:25]<roycroft>but thought it prudent to mention
[08:27:26]<roycroft>also
[08:27:36]<roycroft>the current server is still running debian wheezy
[08:27:46]<roycroft>the new one is running the latest version of jessie
[08:28:08]<roycroft>i don't know if that module version error is a drupal thing or an os support utilities thing
[08:28:15]<roycroft>because i still don't know enough about aegir/drupal
[08:28:20]<ergonlogic>using the db credentials in the server's alias (/var/aegir/.drush/server_[hostname].drushrc.php)
[08:28:34]<ergonlogic>can you connect from the master server to the new db server?
[08:28:50]<ergonlogic>a "verify" task should confirm this
[08:29:15]<roycroft>it did confirm it
[08:29:32]<ergonlogic>anyway, the first thing you'll need to do is create a new platform on the new server
[08:29:58]<ergonlogic>then clone/migrate the site to the new platform, and specify the new db server
[08:29:58]<roycroft>Provision can create new databases.
[08:29:59]<roycroft>etc.
[08:30:11]<ergonlogic>ok, so the db server portion shjould be fine
[08:30:41]<ergonlogic>remote http servers that try to use the default db server often fail, since it uses "localhost" as the hostname
[08:31:11]<roycroft>i create grants for localhost as well as for the interface ip address
[08:31:38]<ergonlogic>as for the schema version, make sure that there isn't a site-local version of the module
[08:31:49]<roycroft>so to create this platform, i could make a tarball of the platform on the old server and install that on the new one?
[08:31:52]<roycroft>that simple?
[08:32:07]<ergonlogic>you can, yes
[08:32:17]<ergonlogic>though you'll need to clean up the sites/ dir
[08:32:26]<roycroft>i have no idea what my boss might have done to the platform code
[08:32:36]<ergonlogic>otherwise Aegir will detect the installed sites and try to import them
[08:34:23]<ergonlogic>worst case, you can `drush @sitename sqlc` to get to the sites mysql console
[08:34:32]<ergonlogic>(take a site backup first, though)
[08:34:52]<ergonlogic>and alter the version in the `system` table, for that module
[08:35:15]<ergonlogic>assuming you're SQL-fu is up to the task
[08:36:08]<roycroft>so
[08:36:13]<roycroft>sorry - phone
[08:36:18]<roycroft>sql i know
[08:36:23]<roycroft>aegir/drupal, not so much
[08:36:59]<roycroft>the db is gone on the new server though
[08:37:13]<roycroft>when the migrate failed aegir did a good job of rolling back - it dropped the database
[08:37:29]<ergonlogic>start by cloning the site
[08:37:49]<ergonlogic>it operates identically to a migration, except that it won't tear down the original site
[08:38:12]<ergonlogic>i.e., takes a backup, then redeploys it, runs update scripts, etc.
[08:39:00]<roycroft>the original site is down already
[08:39:14]<ergonlogic>also, you don't usually need to disable the site for a migration, as Aegir will do that prior to the backup, and then re-enable post migration
[08:39:18]<roycroft>it's been taking about 500 hits/second for a while
[08:39:27]<ergonlogic>ah, ok
[08:39:30]<roycroft>the original url now resolves to 127.0.0.1 :)
[08:39:42]<ergonlogic>I'm not certain that you can migrate a disabled site
[08:39:45]<roycroft>but i want to move it for when i get ready to try it again
[08:39:50]<roycroft>i can reenable it
[08:40:05]<roycroft>it just won't be reachable, assuming aegir will enable a site without proper dns
[08:40:31]<ergonlogic>you could also re-name it temporarily, by running a mogration, changing the URL, but leaving it on the same platform
[08:40:40]<roycroft>so having copied the platform, (i just used scp)
[08:40:51]<roycroft>i go to the sites directory and nuke everything but default?
[08:41:04]<roycroft>on the copy, that is
[08:41:15]<ergonlogic>yes, pretty much
[08:41:25]<ergonlogic>also, look in the sites.php in that dir
[08:41:31]<ergonlogic>you may need to clean that up too
[08:41:32]<roycroft>something in the back of my mind tells me that i did this very thing once before
[08:41:37]<roycroft>ok
[08:42:58]* mollux1 has joined #aegir
[08:43:02]* boshtian has quit (Ping timeout: 276 seconds)
[08:45:07]<roycroft>i think i can nuke sites.php
[08:45:17]<roycroft>aegir should regenerate it
[08:45:18]<ergonlogic>no, leav it
[08:45:25]<ergonlogic>yes, it should
[08:45:26]<roycroft>the example.sites.php is still there
[08:45:35]<roycroft>so by "nuke" i mean "rename for now"
[08:45:37]<ergonlogic>you'll want to verify the new platform
[08:45:47]<roycroft>should i rename it then?
[08:45:50]<roycroft>the new platform?
[08:46:15]<ergonlogic>the path to the platform, you mean?
[08:46:23]<roycroft>yes
[08:47:43]<ergonlogic>yes, it'd be best to have a different path for it
[08:47:50]<ergonlogic>though that isn;t strictly req'd
[08:48:01]<roycroft>ok, i'll make it something more site-specific
[08:48:19]<ergonlogic>actually, come to think of it... I think it is req'd actually
[08:49:15]<ergonlogic>hmm, I usually use drush makefiles, so manually creating platforms isn;t something I dooo often
[08:49:44]<ergonlogic>I think you may actually need to deploy the new platform on the master server
[08:50:02]<roycroft>ok
[08:50:03]<ergonlogic>the verify task will rsync it out to the remote server
[08:50:19]<ergonlogic>which is why you need the paths to be different
[08:50:35]<ergonlogic>Aegir currently uses a hub&spoke network model
[08:51:03]<ergonlogic>all Aegir ops go through the master server
[08:52:58]<roycroft>i'm creating a new platform on the master right now
[08:53:33]* mollux1 has quit (Quit: Leaving.)
[08:53:41]* v20th has quit (Quit: Leaving)
[08:55:44]<roycroft>ok, platform created and verified
[08:57:04]<roycroft>however, although i see the new platform listed when i go to clone the site, it is not selectable
[08:57:10]<roycroft>the remote database server is selectable
[08:57:13]<roycroft>but not the new platform
[08:57:32]<roycroft>aah, there is an error in that new platform
[08:57:47]<roycroft>the media module that gave the error before when i attempted to migrate the site
[08:58:25]<roycroft>the current version is newer than the target
[08:58:29]<roycroft>so i'm back to that
[08:58:38]<ergonlogic>ok, so check in the site's modules/ dir
[08:58:57]<ergonlogic>as well as the current platform sites/all/modules
[08:59:10]<ergonlogic>for the version of the media module
[08:59:27]<ergonlogic>which'll be in `media.info`
[08:59:29]<roycroft>it is empty
[08:59:35]<roycroft>sites/sitname/modules
[08:59:41]<roycroft>that is an empty directory
[08:59:47]<ergonlogic>ok, and sites/all/modules ?
[08:59:49]<roycroft>maybe sites/all/modules?
[09:00:01]<ergonlogic>on the current platform
[09:00:15]<roycroft>yes, there are directories there
[09:00:27]<ergonlogic>also look in media.install
[09:00:28]<roycroft>the module that's failing is called "media"
[09:00:34]<roycroft>but there is no media directory
[09:00:46]<ergonlogic>perhaps in a subdir?
[09:00:59]<ergonlogic>sites/all/modules/contrib, perhaps?
[09:01:29]<roycroft>nope
[09:01:41]<ergonlogic>it's also possible that the media module lives in the install profile's modules/ dir
[09:01:57]<ergonlogic>is this an OpenAtrium, site, or some other distro?
[09:02:08]<roycroft>i don't know what openatrium is
[09:02:18]<roycroft>the platform is commons-7.x.3.36
[09:02:18]<ergonlogic>it's a lfavor of Drupal
[09:02:27]<roycroft>drupal 7
[09:02:30]<ergonlogic>that'll install a sort of intranet portal
[09:02:47]<ergonlogic>ok, so look in the profiles/ dir in the current platform
[09:02:59]<roycroft>and if i'm giving bad answers, understand that i didn't install any of this
[09:03:05]<ergonlogic>in aegir, you;ll also see the profile listed as a field on the site node
[09:03:06]<roycroft>i'm just doing forensics now :)
[09:03:22]<ergonlogic>np, I'm taking that into account :)
[09:03:53]<ergonlogic>I'm also assuming little knowledge of Drupal internals
[09:04:04]<roycroft>what about /profiles/commons/modules/commons_media ?
[09:04:12]<ergonlogic>ah, commons
[09:04:37]<ergonlogic>so this site is using a community-building distribution
[09:04:41]<roycroft>i could do the database hack you suggested earlier
[09:04:46]<roycroft>but i'd rather just fix this
[09:05:20]<ergonlogic>what about profiles/commons/contrib/ or something like that?
[09:05:44]<roycroft>aah, there's a media directory there
[09:05:58]<ergonlogic>commons_media is likely to be exported configuration of the media module spefici to the commons distro
[09:06:06]<ergonlogic>ok, so that's the one to check
[09:06:23]<ergonlogic>firs look for the version in media.info
[09:06:33]<roycroft>7.x-2.x-dev
[09:06:35]<roycroft>that's what it says
[09:06:43]<ergonlogic>but the schema version is going to be in media.install
[09:06:54]<ergonlogic>ugh, they're using a dev version
[09:07:07]<roycroft>these are the diffs between what is and what it expects:
[09:07:08]<roycroft>7.x-2.0-beta1+8-dev (7227)
[09:07:14]<roycroft>7.x-2.0-beta1+8-dev (7226)
[09:07:38]<ergonlogic>in media.install, you should see a number of functions of the form media_install_N()
[09:07:51]<ergonlogic>where "N" represents the schema version
[09:08:33]<roycroft>i don't
[09:08:40]<ergonlogic>this, btw, is a mechanism that allows modules to make changes to db tables, etc. with each new version of the module
[09:08:47]<ergonlogic>oops
[09:08:49]<roycroft>but there is a media_update_7219 function
[09:08:56]<ergonlogic>sorry, media_update_N()
[09:09:00]<ergonlogic>right
[09:09:06]<ergonlogic>is that the last one?
[09:09:16]<ergonlogic>last == the one with the highest number?
[09:09:41]<roycroft>7226 is the last one
[09:10:09]<ergonlogic>you mentioned a diff with 7227 earlier
[09:10:20]<roycroft>when i go to clone a site
[09:10:22]<ergonlogic>those are patches?
[09:10:35]<roycroft>and i cannot select the platform i want
[09:10:43]<roycroft>there's a "compare platforms" option
[09:10:47]<roycroft>i select that
[09:11:00]<ergonlogic>the site schema is version 7227?
[09:11:10]<roycroft>and it presents a table with the columns "package", "current", and "target"
[09:11:13]<ergonlogic>but the module version 7226?
[09:11:28]<roycroft>"current" for that package is 7227
[09:11:32]<roycroft>and "target" is 7226
[09:11:41]<ergonlogic>ok, so take a site backup
[09:11:46]<roycroft>ok
[09:11:48]<ergonlogic>if you haven't already
[09:12:09]<roycroft>i back up every night
[09:12:14]<roycroft>but i'm doing one explicitly right now
[09:12:26]<roycroft>i do fs and db backups every night, not drupal backups
[09:12:30]<ergonlogic>here's what I think happened, from having done similar forensics many times previously:
[09:12:35]<roycroft>i'm doing this backup from aegir
[09:12:47]<ergonlogic>yes, that's what's needed here
[09:13:09]<ergonlogic>if we're going to mess with the site db, better make it easy to restore
[09:13:17]<roycroft>right
[09:13:25]<roycroft>the backup is processing now
[09:13:36]<ergonlogic>once the backups is done, run `drush @sitename sqlc`
[09:14:39]<roycroft>to get a mysql command prompt?
[09:15:06]<ergonlogic>yes
[09:15:19]<roycroft>ok, i have a mysql command prompt and have selected the proper database
[09:15:31]<ergonlogic>in this case, we're concerned mostly with the system table
[09:15:48]<roycroft>ok
[09:16:05]<ergonlogic>I suspect that a newer version of the media module was installed at some point, probably trying to implement a new feature, or fix a bug, or something
[09:16:27]<ergonlogic>but then the newer version was removed, and we're now back to using an older version
[09:17:01]<ergonlogic>the site's database keeps track of the schema version though, so as not to re-run previous upgrade steps
[09:17:13]<ergonlogic>so `desc system`;
[09:17:49]<roycroft>i've found what i need
[09:18:10]<roycroft>select name,schema_version from system where name = 'media';
[09:18:28]<roycroft>schema_version is 7227
[09:18:34]<roycroft>so i just need to update that to 7226, eh?
[09:18:36]<ergonlogic>ok, also check filename
[09:18:46]<ergonlogic>and make sure it's using the one in the profile
[09:19:04]<roycroft> profiles/commons/modules/contrib/media/media.module | media | 7227
[09:19:16]<ergonlogic>but then, yes, just update the schema_version to 7226
[09:19:32]<ergonlogic>then re-verify the site in the Aegir front-end
[09:19:51]<roycroft> profiles/commons/modules/contrib/media/media.module | media | 7226
[09:19:58]<roycroft>ok, i should be good to go
[09:20:03]<ergonlogic>part of a site verify is gathering a bunch of data about the site, including versions of all installed packages
[09:20:16]<roycroft>verify is in the queue
[09:20:29]<roycroft>i think i was not expected to know how to do this :)
[09:20:30]<ergonlogic>that's where the comparison gets its data
[09:21:09]<ergonlogic>no, but this is the result of someone messing around with a platform, and downgrading a module
[09:21:18]<roycroft>sounds like something my boss would do
[09:21:22]<roycroft>i build him sandbox machines
[09:21:26]<roycroft>he plays with production machines
[09:21:30]<ergonlogic>there may be an entry somewhere in the trouble-shooting guide, but I don;t really know
[09:21:31]<roycroft>i clean up the messes
[09:21:58]<roycroft>ok, it verified clean
[09:22:09]<ergonlogic>ok, so now try to clone the site
[09:22:20]<roycroft>and i am able to select the new platform now
[09:22:34]<ergonlogic>downgrading a module isn't supported in Drupal
[09:22:49]<ergonlogic>so that comparison is a safe-guard against shooting yourself in the foot
[09:23:07]<ergonlogic>but then, sometimes you need to work around it
[09:23:11]<roycroft>yes
[09:23:21]<ergonlogic>such as, when you've already shot yourself in the foot
[09:23:25]<roycroft>so instead of my boss shooting himself in the foot
[09:23:28]<ergonlogic>:p
[09:23:28]<roycroft>he shot me in the foot!
[09:23:45]<ergonlogic>"you", in the royal sense :)
[09:24:10]<roycroft>it looks like i have some apache voodoo to do on the new machine
[09:24:14]<roycroft>but it cloned over just fine
[09:24:18]<roycroft>thank you again
[09:24:23]<ergonlogic>anyway, be aware that this might cause some issues when you upgrade this site
[09:24:29]<ergonlogic>np
[09:24:37]<roycroft>i hate coming here to ask about aegir stuff that usually i think i should know
[09:24:54]<roycroft>i'll give myself a pass this time though, since it was a weird situation
[09:25:15]<ergonlogic>the issue that you *may* run into is that the 7227 update may have changed something in the db table definitions, or whatnot
[09:25:43]<ergonlogic>so, when it gets run on an upgrade, a db change might fail
[09:26:26]<ergonlogic>so, at that point, we'd have to look at the update code, and perhaps comment it out temporarily
[09:26:42]<ergonlogic>anyway, yeah, don't beat yourself up
[09:26:59]<ergonlogic>you're cleaning up someone else's mess :)
[09:29:28]<roycroft>my recollection is that since /etc/apache2 is owned by root, aegir can't stuff in the files with the links to /var/aegir
[09:29:37]<roycroft>so i just have to do that and then the site will work
[09:30:12]<roycroft>and i'm making notes in the site changelog that i altered the schema entry in the database
[09:30:30]<roycroft>so that if we do attempt an upgrade and it fails, i might hve a clue why it failed
[09:30:55]<ergonlogic>there should be a symlink from (iirc) /etc/apache2/aegir.conf to /var/aegir/config/server_[server_name]/apache.conf
[09:31:26]<roycroft>i'm looking at a different stand-alone site now
[09:31:56]<roycroft>and that's almost correct
[09:32:03]<roycroft>lrwxrwxrwx 1 root root 29 Jun 29 2016 aegir.conf -> /var/aegir/config/apache.conf
[09:32:14]<ergonlogic>ah, right
[09:32:36]* shaneonabike1 has quit (Remote host closed the connection)
[09:32:36]<roycroft>and on debina that's in /etc/apache2/conf.available
[09:32:36]<ergonlogic>that'll then have the included of the server-specific configs
[09:32:47]<roycroft>because debian likes to make things as complicated as possible :)
[09:35:21]<roycroft>hmm, i'm getting the requirements problem page
[09:35:42]<roycroft>is that because there's some missing utilities, which once fixed will allow the site to load properly?
[09:36:39]<ergonlogic>"requirements problem page"?
[09:37:01]<roycroft>when i browse the url for the site i get a page that says "requirments problem"
[09:37:12]<roycroft>and lists a bunch of problems (that i can easily fix)
[09:38:51]<roycroft>i'll just fix them and see if the site loads
[09:40:23]<ergonlogic>like missing php extensions, and stuff?
[09:40:58]<roycroft>yes
[09:41:04]<roycroft>and php parameters
[09:41:12]<roycroft>i'm not worried about fixing that stuff
[09:41:27]<roycroft>just hoping that when i'm done i get the site to load normally
[09:41:50]<roycroft>one of the errors is that the settings file is not writable
[09:41:56]<roycroft>and i don't think it should be, once configuration is done
[09:42:41]<roycroft>now all i have to do is find which one of the 127 php.inis that debian installs is the magic one for my website :)
[09:43:49]<roycroft>ha
[09:43:55]<roycroft>i guessed the correct one first time
[09:50:47]<roycroft>oddly, when it migrated the site the platform/sites/default directory did not get created
[09:51:01]<roycroft>i scp'ed that over from the master, fixed permissions, and now all is well
[09:52:14]<roycroft>i think i'm going to build a sandbox farm and practice doing these migrations until i fully understand the process
[09:55:34]<roycroft>anyway, thank you again
[09:55:40]<ergonlogic>np
[09:55:47]<roycroft>this is one of the few irc channels where i go and when i leave my problem is fixed
[09:55:56]<roycroft>now
[09:56:07]<ergonlogic>reading the task logs is a good way to familiarize yourself with the processes that Aegir uses to accomplish various tasks
[09:56:19]<roycroft>can you help me stop the ddos so i can actually put that stie back online/ :)
[09:56:24]<roycroft>yes, i do read the task logs
[09:56:32]<roycroft>and they are very helpful
[09:56:57]<ergonlogic>I'd suggest a service like cloudflare, to help with ddos
[09:57:13]<ergonlogic>or running something like varnish
[09:57:24]<roycroft>i'm thinking more along the lines of requiring every american to start smoking pot and stop yelling at each other
[09:57:48]<roycroft>or maybe just smash there televisions
[09:58:01]<roycroft>their
[09:58:20]<roycroft>politics has driven this country insane
[09:58:34]<roycroft>and i'm not picking or blaming sides
[09:58:37]<roycroft>it's all insane
[09:58:57]<roycroft>if this keeps up we are going to recommend that our customer find another hosting provider
[09:59:20]<roycroft>i work for a small isp - one of the few remaining full-service isps (we still have dialup even)
[09:59:36]<roycroft>a ddos on one site can affect our entire operation
[09:59:44]<roycroft>anyway, time to go home
[09:59:46]<roycroft>cheers!
[09:59:47]* roycroft has left #aegir ()
[10:00:49]<ergonlogic>good luck, and good evening :)
[10:25:02]* mutin-s has joined #aegir
[10:28:24]* joestewart_ has joined #aegir
[10:34:31]* s-mutin has quit (*.net *.split)
[10:34:33]* joestewart has quit (*.net *.split)
[10:34:39]* ergonlogic has quit (*.net *.split)