Hello community, here is the log from the commit of package icingaweb2-module-director for openSUSE:Factory checked in at 2019-10-17 12:22:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/icingaweb2-module-director (Old) and /work/SRC/openSUSE:Factory/.icingaweb2-module-director.new.2352 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "icingaweb2-module-director" Thu Oct 17 12:22:34 2019 rev:11 rq:738919 version:1.7.1 Changes: -------- --- /work/SRC/openSUSE:Factory/icingaweb2-module-director/icingaweb2-module-director.changes 2019-10-16 09:12:30.963895794 +0200 +++ /work/SRC/openSUSE:Factory/.icingaweb2-module-director.new.2352/icingaweb2-module-director.changes 2019-10-17 12:22:41.151112596 +0200 @@ -1,0 +2,25 @@ +Wed Oct 16 15:20:16 UTC 2019 - ec...@opensuse.org + +- Update to 1.7.1 + * Fixed issues + - You can find issues and feature requests related to this + release on our roadmap + * User Interface + - FIX: Cloning Sync rules failed since v1.7.0 (#1982) + - FIX: It wasn't possible to multi-select Hosts belonging to a + Group (#1973) + - FIX: Removed an un-formatted error in case Icinga is + unreachable (#1966) + - FIX: Check for broken configs has been extended to Icinga + v2.11.* (#1985) + - FEATURE: Show a warning when detecting a downgraded + installation (#1992) + * Import and Sync + - FIX: Upper- and Lowercase property modifiers are now + multibyte/UTF8-safe (#710) + * Health Check + - FIX: do not complain about no-due newly created jobs (#1994) + * Background Daemon + - FIX: Daemon didn't report DB state to systemd (#1983) + +------------------------------------------------------------------- Old: ---- icingaweb2-module-director-1.7.0.tar.gz New: ---- icingaweb2-module-director-1.7.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ icingaweb2-module-director.spec ++++++ --- /var/tmp/diff_new_pack.dP5hmq/_old 2019-10-17 12:22:42.671108783 +0200 +++ /var/tmp/diff_new_pack.dP5hmq/_new 2019-10-17 12:22:42.675108773 +0200 @@ -19,7 +19,7 @@ # See also http://en.opensuse.org/openSUSE:Specfile_guidelines Name: icingaweb2-module-director -Version: 1.7.0 +Version: 1.7.1 Release: 0 Summary: Config module for Icinga Web 2 License: GPL-2.0-or-later ++++++ icingaweb2-module-director-1.7.0.tar.gz -> icingaweb2-module-director-1.7.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/application/controllers/IndexController.php new/icingaweb2-module-director-1.7.1/application/controllers/IndexController.php --- old/icingaweb2-module-director-1.7.0/application/controllers/IndexController.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/application/controllers/IndexController.php 2019-10-16 14:49:24.000000000 +0200 @@ -6,6 +6,7 @@ use Icinga\Module\Director\Db\Migrations; use Icinga\Module\Director\Forms\ApplyMigrationsForm; use Icinga\Module\Director\Forms\KickstartForm; +use ipl\Html\Html; class IndexController extends DashboardController { @@ -28,6 +29,12 @@ ->setMigrations($migrations) ->handleRequest() ); + } elseif ($migrations->hasBeenDowngraded()) { + $this->content()->add(Html::tag('p', ['class' => 'state-hint warning'], sprintf($this->translate( + 'Your DB schema (migration #%d) is newer than your code base.' + . ' Downgrading Icinga Director is not supported and might' + . ' lead to unexpected problems.' + ), $migrations->getLastMigrationNumber()))); } parent::indexAction(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/application/controllers/SyncruleController.php new/icingaweb2-module-director-1.7.1/application/controllers/SyncruleController.php --- old/icingaweb2-module-director-1.7.0/application/controllers/SyncruleController.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/application/controllers/SyncruleController.php 2019-10-16 14:49:24.000000000 +0200 @@ -24,6 +24,7 @@ use Icinga\Module\Director\Web\Table\SyncRunTable; use Icinga\Module\Director\Web\Tabs\SyncRuleTabs; use Icinga\Module\Director\Web\Widget\SyncRunDetails; +use ipl\Html\Form; use ipl\Html\Html; use gipfl\IcingaWeb2\Link; @@ -509,6 +510,9 @@ $form = new CloneSyncRuleForm($rule); $this->content()->add($form); + $form->on(Form::ON_SUCCESS, function (CloneSyncRuleForm $form) { + $this->getResponse()->redirectAndExit($form->getSuccessUrl()); + }); $form->handleRequest($this->getServerRequest()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/application/forms/DeployFormsBug7530.php new/icingaweb2-module-director-1.7.1/application/forms/DeployFormsBug7530.php --- old/icingaweb2-module-director-1.7.0/application/forms/DeployFormsBug7530.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/application/forms/DeployFormsBug7530.php 2019-10-16 14:49:24.000000000 +0200 @@ -68,7 +68,9 @@ $version = $this->api->getVersion(); if ($version === null) { throw new \RuntimeException($this->translate('Unable to detect your Icinga 2 Core version')); - } elseif ($version === '2.11.0') { + } elseif (\version_compare($version, '2.11.0', '>=') + && \version_compare($version, '2.12.0', '<') + ) { return true; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/application/forms/DeploymentLinkForm.php new/icingaweb2-module-director-1.7.1/application/forms/DeploymentLinkForm.php --- old/icingaweb2-module-director-1.7.0/application/forms/DeploymentLinkForm.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/application/forms/DeploymentLinkForm.php 2019-10-16 14:49:24.000000000 +0200 @@ -84,7 +84,13 @@ $this->setAttrib('class', 'inline'); $this->addHtml(Icon::create('wrench')); - $target = $this->shouldWarnAboutBug7530() ? '_self' : '_next'; + try { + // As this is shown for single objects, ignore errors caused by an + // unreachable core + $target = $this->shouldWarnAboutBug7530() ? '_self' : '_next'; + } catch (\Exception $e) { + $target = '_next'; + } $this->addSubmitButton($this->translate('Deploy'), [ 'class' => 'link-button icon-wrench', 'title' => $msg, @@ -108,8 +114,12 @@ public function onSuccess() { - if ($this->skipBecauseOfBug7530()) { - return; + try { + if ($this->skipBecauseOfBug7530()) { + return; + } + } catch (\Exception $e) { + // continue } $this->deploy(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/doc/02-Installation.md new/icingaweb2-module-director-1.7.1/doc/02-Installation.md --- old/icingaweb2-module-director-1.7.0/doc/02-Installation.md 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/doc/02-Installation.md 2019-10-16 14:49:24.000000000 +0200 @@ -92,7 +92,7 @@ ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules" REPO_URL="https://github.com/icinga/icingaweb2-module-director" TARGET_DIR="${ICINGAWEB_MODULEPATH}/director" - MODULE_VERSION="1.7.0" + MODULE_VERSION="1.7.1" URL="${REPO_URL}/archive/v${MODULE_VERSION}.tar.gz" install -d -m 0755 "${TARGET_DIR}" wget -q -O - "$URL" | tar xfz - -C "${TARGET_DIR}" --strip-components 1 @@ -109,7 +109,7 @@ ICINGAWEB_MODULEPATH="/usr/share/icingaweb2/modules" REPO_URL="https://github.com/icinga/icingaweb2-module-director" TARGET_DIR="${ICINGAWEB_MODULEPATH}/director" - MODULE_VERSION="1.7.0" + MODULE_VERSION="1.7.1" git clone "${REPO_URL}" "${TARGET_DIR}" --branch v${MODULE_VERSION} You can now directly use our current GIT master or check out a specific version. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/doc/75-Background-Daemon.md new/icingaweb2-module-director-1.7.1/doc/75-Background-Daemon.md --- old/icingaweb2-module-director-1.7.0/doc/75-Background-Daemon.md 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/doc/75-Background-Daemon.md 2019-10-16 14:49:24.000000000 +0200 @@ -8,10 +8,7 @@ Daemon Installation ------------------- -In case you installed Icinga Director as a package, the daemon should already -have been installed. In case you're running directly from a GIT working copy or -from a manual installation, you need to tell `systemd` about your new service. - +To run the Background Daemon, you need to tell `systemd` about your new service. First make sure that the system user `icingadirector` exists. In case it doesn't, please create one: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/doc/82-Changelog.md new/icingaweb2-module-director-1.7.1/doc/82-Changelog.md --- old/icingaweb2-module-director-1.7.0/doc/82-Changelog.md 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/doc/82-Changelog.md 2019-10-16 14:49:24.000000000 +0200 @@ -4,6 +4,29 @@ Please make sure to always read our [Upgrading](05-Upgrading.md) documentation before switching to a new version. +1.7.1 +----- + +### Fixed issues +* You can find issues and feature requests related to this release on our + [roadmap](https://github.com/Icinga/icingaweb2-module-director/milestone/22?closed=1) + +### User Interface +* FIX: Cloning Sync rules failed since v1.7.0 (#1982) +* FIX: It wasn't possible to multi-select Hosts belonging to a Group (#1973) +* FIX: Removed an un-formatted error in case Icinga is unreachable (#1966) +* FIX: Check for broken configs has been extended to Icinga v2.11.* (#1985) +* FEATURE: Show a warning when detecting a downgraded installation (#1992) + +### Import and Sync +* FIX: Upper- and Lowercase property modifiers are now multibyte/UTF8-safe (#710) + +### Health Check +* FIX: do not complain about no-due newly created jobs (#1994) + +### Background Daemon +* FIX: Daemon didn't report DB state to systemd (#1983) + 1.7.0 ----- ### Breaking Changes diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Daemon/BackgroundDaemon.php new/icingaweb2-module-director-1.7.1/library/Director/Daemon/BackgroundDaemon.php --- old/icingaweb2-module-director-1.7.0/library/Director/Daemon/BackgroundDaemon.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Daemon/BackgroundDaemon.php 2019-10-16 14:49:24.000000000 +0200 @@ -6,7 +6,6 @@ use gipfl\Cli\Process; use gipfl\IcingaCliDaemon\DbResourceConfigWatch; use gipfl\SystemD\NotifySystemD; -use Icinga\Module\Director\Db; use React\EventLoop\Factory as Loop; use React\EventLoop\LoopInterface; use Ramsey\Uuid\Uuid; @@ -16,14 +15,9 @@ /** @var LoopInterface */ private $loop; - /** @var Db */ - protected $connection; - /** @var NotifySystemD|boolean */ protected $systemd; - protected $onShutdown; - /** @var JobRunner */ protected $jobRunner; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Daemon/DaemonDb.php new/icingaweb2-module-director-1.7.1/library/Director/Daemon/DaemonDb.php --- old/icingaweb2-module-director-1.7.0/library/Director/Daemon/DaemonDb.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Daemon/DaemonDb.php 2019-10-16 14:49:24.000000000 +0200 @@ -107,7 +107,7 @@ } else { Logger::error('DB configuration is no longer valid'); } - $this->emitStatus('there is no valid DB configuration'); + $this->emitStatus('no configuration'); $this->dbConfig = $config; return new FulfilledPromise(); @@ -136,6 +136,7 @@ $this->pendingReconnection->reset(); $this->pendingReconnection = null; } + $this->emitStatus('connecting'); return $this->pendingReconnection = RetryUnless::succeeding($callback) ->setInterval(0.2) @@ -151,11 +152,12 @@ $connection->getDbAdapter()->getConnection(); $migrations = new Migrations($connection); if (! $migrations->hasSchema()) { - $this->emit('status', ['DB has no schema', 'error']); + $this->emitStatus('no schema', 'error'); throw new RuntimeException('DB has no schema'); } $this->wipeOrphanedInstances($connection); if ($this->hasAnyOtherActiveInstance($connection)) { + $this->emitStatus('locked by other instance', 'error'); throw new RuntimeException('DB is locked by a running daemon instance'); } $this->startupSchemaVersion = $migrations->getLastMigrationNumber(); @@ -286,7 +288,7 @@ protected function emitStatus($message, $level = 'info') { - $this->emit('status', [$message, $level]); + $this->emit('state', [$message, $level]); return $this; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Db/Migrations.php new/icingaweb2-module-director-1.7.1/library/Director/Db/Migrations.php --- old/icingaweb2-module-director-1.7.0/library/Director/Db/Migrations.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Db/Migrations.php 2019-10-16 14:49:24.000000000 +0200 @@ -139,16 +139,31 @@ if ($version === 0) { $filename = $this->getFullSchemaFile(); } else { - $filename = sprintf( - '%s/upgrade_%d.sql', - $this->getMigrationsDir(), - $version - ); + $filename = $this->getMigrationFileName($version); } return file_get_contents($filename); } + public function hasBeenDowngraded() + { + return ! $this->hasMigrationFile($this->getLastMigrationNumber()); + } + + public function hasMigrationFile($version) + { + return \file_exists($this->getMigrationFileName($version)); + } + + protected function getMigrationFileName($version) + { + return sprintf( + '%s/upgrade_%d.sql', + $this->getMigrationsDir(), + $version + ); + } + protected function listMigrationsAfter($version) { $filtered = array(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Health.php new/icingaweb2-module-director-1.7.1/library/Director/Health.php --- old/icingaweb2-module-director-1.7.0/library/Director/Health.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Health.php 2019-10-16 14:49:24.000000000 +0200 @@ -212,7 +212,7 @@ $name = $job->get('job_name'); if ($job->hasBeenDisabled()) { $check->succeed("'$name' has been disabled"); - } elseif (! $job->lastAttemptSucceeded()) { + } elseif ($job->lastAttemptFailed()) { $message = $job->get('last_error_message'); $check->fail("Last attempt for '$name' failed: $message"); } elseif ($job->isOverdue()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Objects/DirectorJob.php new/icingaweb2-module-director-1.7.1/library/Director/Objects/DirectorJob.php --- old/icingaweb2-module-director-1.7.0/library/Director/Objects/DirectorJob.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Objects/DirectorJob.php 2019-10-16 14:49:24.000000000 +0200 @@ -156,6 +156,11 @@ return $this->get('last_attempt_succeeded') === 'y'; } + public function lastAttemptFailed() + { + return $this->get('last_attempt_succeeded') === 'n'; + } + public function hasTimeperiod() { return $this->get('timeperiod_id') !== null; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/PropertyModifier/PropertyModifierLowercase.php new/icingaweb2-module-director-1.7.1/library/Director/PropertyModifier/PropertyModifierLowercase.php --- old/icingaweb2-module-director-1.7.0/library/Director/PropertyModifier/PropertyModifierLowercase.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/PropertyModifier/PropertyModifierLowercase.php 2019-10-16 14:49:24.000000000 +0200 @@ -8,6 +8,6 @@ { public function transform($value) { - return strtolower($value); + return \mb_strtolower($value, 'UTF-8'); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/PropertyModifier/PropertyModifierUppercase.php new/icingaweb2-module-director-1.7.1/library/Director/PropertyModifier/PropertyModifierUppercase.php --- old/icingaweb2-module-director-1.7.0/library/Director/PropertyModifier/PropertyModifierUppercase.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/PropertyModifier/PropertyModifierUppercase.php 2019-10-16 14:49:24.000000000 +0200 @@ -8,6 +8,6 @@ { public function transform($value) { - return strtoupper($value); + return \mb_strtoupper($value, 'UTF-8'); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Web/Form/CloneSyncRuleForm.php new/icingaweb2-module-director-1.7.1/library/Director/Web/Form/CloneSyncRuleForm.php --- old/icingaweb2-module-director-1.7.0/library/Director/Web/Form/CloneSyncRuleForm.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Web/Form/CloneSyncRuleForm.php 2019-10-16 14:49:24.000000000 +0200 @@ -26,7 +26,7 @@ protected function assemble() { - $this->addElement('rule_name', 'text', [ + $this->addElement('text', 'rule_name', [ 'label' => $this->translate('New name'), 'value' => $this->rule->get('rule_name'), ]); @@ -59,7 +59,6 @@ } $this->newRule = SyncRule::import($export, $this->getTargetDb()); $this->newRule->store(); - $this->redirectOnSuccess(); } public function getSuccessUrl() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/library/Director/Web/Table/GroupMemberTable.php new/icingaweb2-module-director-1.7.1/library/Director/Web/Table/GroupMemberTable.php --- old/icingaweb2-module-director-1.7.0/library/Director/Web/Table/GroupMemberTable.php 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/library/Director/Web/Table/GroupMemberTable.php 2019-10-16 14:49:24.000000000 +0200 @@ -2,6 +2,7 @@ namespace Icinga\Module\Director\Web\Table; +use gipfl\IcingaWeb2\Table\Extension\MultiSelect; use Icinga\Data\Filter\Filter; use Icinga\Module\Director\Db; use Icinga\Module\Director\IcingaConfig\AssignRenderer; @@ -13,6 +14,8 @@ class GroupMemberTable extends ZfQueryBasedTable { + use MultiSelect; + protected $searchColumns = [ 'o.object_name', // membership_type @@ -40,6 +43,16 @@ $table->type = $type; return $table; } + public function assemble() + { + if ($this->type === 'host') { + $this->enableMultiSelect( + 'director/hosts/edit', + 'director/hosts', + ['name'] + ); + } + } public function setGroup(IcingaObjectGroup $group) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/icingaweb2-module-director-1.7.0/module.info new/icingaweb2-module-director-1.7.1/module.info --- old/icingaweb2-module-director-1.7.0/module.info 2019-09-30 08:48:55.000000000 +0200 +++ new/icingaweb2-module-director-1.7.1/module.info 2019-10-16 14:49:24.000000000 +0200 @@ -1,5 +1,5 @@ Name: Icinga Director -Version: 1.7.0 +Version: 1.7.1 Depends: reactbundle (>=0.7.0), ipl (>=0.3.0), incubator (>=0.5.0) Description: Director - Config tool for Icinga 2 Icinga Director is a configuration tool that has been designed to make