Project

General

Profile

Tâche #17051

Scénario #17217: Qualification EOLE 2.6.0 RC1

impossible de donner des droits sur toutes les bases (*.* ou *) à un rôle

Added by Vincent Chavanon about 6 years ago. Updated almost 6 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
05/27/2016
Due date:
% Done:

100%

Estimated time:
4.00 h
Spent time:
Remaining (hours):
0.0

Description

Cette action génère, lors du lancement de pg_pwd.py :

Traceback (most recent call last):
File "/usr/share/eole/sbin/pg_pwd.py", line 107, in <module>
main()
File "/usr/share/eole/sbin/pg_pwd.py", line 95, in main
roles.extend(get_roles(join(args.dbdir, conf_path)))
File "/usr/share/eole/sbin/pg_pwd.py", line 37, in get_roles
conf = yaml.load(conf_stream)
File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
return loader.get_single_data()
File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
node = self.get_single_node()
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 64, in compose_node
if self.check_event(AliasEvent):
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 449, in parse_block_mapping_value
if not self.check_token(KeyToken, ValueToken, BlockEndToken):
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 224, in fetch_more_tokens
return self.fetch_alias()
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 607, in fetch_alias
self.tokens.append(self.scan_anchor(AliasToken))
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 926, in scan_anchor
% ch.encode('utf-8'), self.get_mark())
yaml.scanner.ScannerError: while scanning an alias
in "/etc/eole/eole-db.d/postgresql_databases.yml", line 16, column 25
expected alphabetic or numeric character, but found '.'
in "/etc/eole/eole-db.d/postgresql_databases.yml", line 16, column 26

Associated revisions

Revision 264f3fa7 (diff)
Added by Benjamin Bohard about 6 years ago

Permettre d’attribuer des droits sur toutes les bases de données.

Ref #17051

Revision aee47210 (diff)
Added by Benjamin Bohard about 6 years ago

Mettre à jour le template pour structurer la configuration comme attendu par le script.

Ref #17051

History

#1 Updated by Benjamin Bohard about 6 years ago

  • Status changed from Nouveau to En cours
  • Estimated time set to 2.00 h
  • Remaining (hours) set to 2.0

#2 Updated by Benjamin Bohard about 6 years ago

L’utilisation de * pour déclarer une base n’est pas autorisé (mais de manière suffisamment stricte) avec le code actuel.
Ce choix avait été fait devant la difficulté à s’assurer que l’expansion de la variable * se fasse au bon moment (au moment où toutes les bases de données qui seront accessibles à la fin du reconfigure sont connues).

#3 Updated by Benjamin Bohard about 6 years ago

  • Estimated time changed from 2.00 h to 4.00 h

#4 Updated by Benjamin Bohard about 6 years ago

  • Remaining (hours) changed from 2.0 to 3.0

#5 Updated by Benjamin Bohard about 6 years ago

  • % Done changed from 0 to 90

Tous les cas n’ont pas été testés.

#6 Updated by Vincent Chavanon about 6 years ago

bonjour,

Les droits sont correctement positionnés dans le pg_hba.conf si on essaie de donner des droits sur toutes les bases.

En revanche, dans ce cas d'usage, le script pg_pwd.py génère une erreur :

File "/usr/share/eole/sbin/pg_pwd.py", line 107, in &lt;module&gt;
main()
File "/usr/share/eole/sbin/pg_pwd.py", line 95, in main
roles.extend(get_roles(join(args.dbdir, conf_path)))
File "/usr/share/eole/sbin/pg_pwd.py", line 37, in get_roles
conf = yaml.load(conf_stream)
File "/usr/lib/python2.7/dist-packages/yaml/__init__.py", line 71, in load
return loader.get_single_data()
File "/usr/lib/python2.7/dist-packages/yaml/constructor.py", line 37, in get_single_data
node = self.get_single_node()
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
File "/usr/lib/python2.7/dist-packages/yaml/composer.py", line 110, in compose_sequence_node
while not self.check_event(SequenceEndEvent):
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 379, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
File "/usr/lib/python2.7/dist-packages/yaml/parser.py", line 384, in parse_block_sequence_entry
if not self.check_token(BlockEntryToken, BlockEndToken):
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 224, in fetch_more_tokens
return self.fetch_alias()
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 607, in fetch_alias
self.tokens.append(self.scan_anchor(AliasToken))
File "/usr/lib/python2.7/dist-packages/yaml/scanner.py", line 926, in scan_anchor
% ch.encode('utf-8'), self.get_mark())
yaml.scanner.ScannerError: while scanning an alias
in "/etc/eole/eole-db.d/postgresql_databases.yml", line 36, column 37
expected alphabetic or numeric character, but found '.'
in "/etc/eole/eole-db.d/postgresql_databases.yml", line 36, column 38

#7 Updated by Emmanuel IHRY about 6 years ago

  • Parent task changed from #17011 to #17217

#8 Updated by Vincent Chavanon almost 6 years ago

  • Status changed from En cours to Résolu

#9 Updated by Vincent Chavanon almost 6 years ago

  • Description updated (diff)
  • Remaining (hours) changed from 3.0 to 0.0

#10 Updated by Thierry Bertrand almost 6 years ago

  • Status changed from Résolu to Fermé

#11 Updated by Thierry Bertrand almost 6 years ago

  • % Done changed from 90 to 100

Also available in: Atom PDF