Project

General

Profile

Actions

Bug #44415

closed

cephfs.pyx: passing empty string is fine but passing None is not to arg conffile in LibCephFS.__cinit__

Added by Rishabh Dave about 4 years ago. Updated over 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
octopus, nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs.pyx
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

diff --git a/src/tools/cephfs/cephfs-shell b/src/tools/cephfs/cephfs-shell
index 932b57f725..180fe577dd 100755
--- a/src/tools/cephfs/cephfs-shell
+++ b/src/tools/cephfs/cephfs-shell
@@ -1477,13 +1477,13 @@ class CephFSShell(Cmd):
 #
 #####################################################

-def setup_cephfs(config_file):
+def setup_cephfs():
     """ 
     Mounting a cephfs
     """ 
     global cephfs
     try:
-        cephfs = libcephfs.LibCephFS(conffile=config_file)
+        cephfs = libcephfs.LibCephFS()
         cephfs.mount()
     except libcephfs.ObjectNotFound as e:
         print('couldn\'t find ceph configuration not found')
@@ -1556,7 +1556,7 @@ if __name__ == '__main__':
     sys.argv.append(exe)
     sys.argv.extend([i.strip() for i in ' '.join(args.commands).split(',')])

-    setup_cephfs(config_file)
+    setup_cephfs()
     shell = CephFSShell()
     shell.exit_code = 0
     read_ceph_conf(shell, config_file)
$ ../src/tools/cephfs/cephfs-shell
unable to get monitor info from DNS SRV with service name: ceph-mon
couldn't find ceph configuration not found


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #46610: octopus: cephfs.pyx: passing empty string is fine but passing None is not to arg conffile in LibCephFS.__cinit__ResolvedRishabh DaveActions
Copied to CephFS - Backport #46611: nautilus: cephfs.pyx: passing empty string is fine but passing None is not to arg conffile in LibCephFS.__cinit__ResolvedRishabh DaveActions
Actions #1

Updated by Rishabh Dave about 4 years ago

According Kefu, this was probably done purposefully by original API author so that client has 3 options: first, get config from given conf file when path is passed, second, read conf files from default locations when None is passed and, third, don't read conf at all when empty string is passed.

He suggested creating new class or tag/flag to make that more clear that there are 3 options altogether.

Actions #2

Updated by Patrick Donnelly about 4 years ago

  • Assignee set to Rishabh Dave
  • Target version set to v16.0.0
  • Source set to Development
  • Backport set to octopus,nautilus
Actions #3

Updated by Rishabh Dave about 4 years ago

  • Pull request ID set to 33818
Actions #4

Updated by Rishabh Dave almost 4 years ago

  • Status changed from New to Fix Under Review
  • Assignee changed from Rishabh Dave to Kefu Chai
Actions #5

Updated by Rishabh Dave almost 4 years ago

  • Pull request ID changed from 33818 to 33912
Actions #6

Updated by Patrick Donnelly almost 4 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #9

Updated by Nathan Cutler almost 4 years ago

  • Backport changed from octopus,nautilus to octopus
Actions #10

Updated by Nathan Cutler almost 4 years ago

Patrick, can you confirm that this cleanup really needs to be backported to nautilus? This change does not apply cleanly to nautilus.

In the PR, Kefu wrote: "i reset the backport field of the tracker ticket you created. there is no need to backport a cleanup."

I guess he forgot to actually change the tracker, but the sentiment seems correct?

Actions #11

Updated by Nathan Cutler almost 4 years ago

  • Backport deleted (octopus)

It doesn't apply cleanly to octopus, either.

Actions #12

Updated by Nathan Cutler almost 4 years ago

  • Status changed from Pending Backport to Resolved
Actions #13

Updated by Nathan Cutler almost 4 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to octopus, nautilus
Actions #14

Updated by Nathan Cutler almost 4 years ago

  • Copied to Backport #46610: octopus: cephfs.pyx: passing empty string is fine but passing None is not to arg conffile in LibCephFS.__cinit__ added
Actions #15

Updated by Nathan Cutler almost 4 years ago

  • Copied to Backport #46611: nautilus: cephfs.pyx: passing empty string is fine but passing None is not to arg conffile in LibCephFS.__cinit__ added
Actions #16

Updated by Nathan Cutler over 3 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Actions

Also available in: Atom PDF