Project

General

Profile

Actions

Bug #8824

closed

Zypper repo management "Delete all other repositories than those managed by Rudder" is broken

Added by Janos Matya over 8 years ago. Updated almost 8 years ago.

Status:
Released
Priority:
N/A
Assignee:
Jonathan CLARKE
Category:
Techniques
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

G'day.

Found apparently a bug in the SLES Zypper repo management technique:

https://github.com/Normation/rudder-techniques/blob/master/techniques/applications/zypperPackageManagerRepositories/1.0/zypper-repositories-management.st#L67

=> Here there is an additional * after the ., which I belive is unnecessary.

At least with empirical tests, with the star I have this output on the repo list I want to clean up:

2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-801fb2a6.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-10.xx.xx.xx-699e6d28.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-604618f7.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-00774129.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-807541a0.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/rudder-active-P-Storage-1.0-PTF.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-10.xx.xx.xx-8a5f7779.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-61481be6.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-334fdb3f.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-085864a6.repo' that is not a directory
2016-08-08T14:48:01+0200  warning: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.:'[0]: depth_search (recursion) is promised for a base object '/etc/zypp/repos.d/http-repo.site.corp-64d041fa.repo' that is not a directory

Without the star it works as designed:

2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-801fb2a6.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-10.xx.xx.xx-699e6d28.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-604618f7.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-00774129.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-807541a0.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./rudder-active-P-Storage-1.0-PTF.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-10.xx.xx.xx-8a5f7779.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-61481be6.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-334fdb3f.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-085864a6.repo'
2016-08-08T15:06:41+0200     info: /default/zypper_repositories_management/files/'/etc/zypp/repos.d/.'[0]: Deleted file '/etc/zypp/repos.d/./http-repo.site.corp-64d041fa.repo'

Here is the proposed diff:

# diff -u zypper-repositories-management.cf.*
--- zypper-repositories-management.cf.bad       2016-08-08 15:14:17.794177601 +0200
+++ zypper-repositories-management.cf.ok        2016-08-08 15:13:52.653494916 +0200
@@ -76,7 +76,7 @@

     SuSE.zypper_disable_other_repositories::

-      "/etc/zypp/repos.d/.*" 
+      "/etc/zypp/repos.d/." 
         delete       => tidy,
         file_select  => ex_list("@{zypper_files}"),
         depth_search => recurse("inf"),

Actions #1

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 3.1.13 to 3.1.14
Actions #2

Updated by François ARMAND over 8 years ago

Thanks for reporting, we believe that you are right that ".*" is broken.

Actions #3

Updated by Alexis Mousset over 8 years ago

  • Target version changed from 3.1.14 to 308
Actions #4

Updated by Alexis Mousset over 8 years ago

  • Status changed from New to In progress
Actions #5

Updated by Alexis Mousset over 8 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Alexis Mousset to Jonathan CLARKE
  • Pull Request set to https://github.com/Normation/rudder-techniques/pull/1016
Actions #6

Updated by Alexis Mousset over 8 years ago

  • Status changed from Pending technical review to Pending release
  • % Done changed from 0 to 100
Actions #7

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 308 to 3.1.14
Actions #8

Updated by Vincent MEMBRÉ about 8 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 3.1.15/14 and 3.2.8/7 which were released today.

Actions #9

Updated by Benoît PECCATTE almost 8 years ago

  • Found in version (s) 3.1.11 added
Actions #10

Updated by Benoît PECCATTE almost 8 years ago

  • Found in version(s) old deleted (3.1.11)
Actions

Also available in: Atom PDF