Bug #2712

onedb does not wotk with shell characters

Added by Nicolas Belan over 7 years ago. Updated over 7 years ago.

Status:ClosedStart date:02/05/2014
Priority:NormalDue date:
Assignee:Carlos Martín% Done:


Target version:Release 4.6
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.4



My mysql database password contains "!" and "$" which are interpreted as shell special characters.
Seen something equivalent in bug#809, but I had tested the following patch, and it works for me:

--- /usr/lib/one/ruby/onedb/onedb_backend.rb 2014-02-05 17:20:39.612367335 0100
+ /usr/lib/one/ruby/onedb/onedb_backend.rb.new 2014-02-05 17:20:26.653125773 +0100
@ -162,7 +162,7 @

def backup(bck_file)
- cmd = "mysqldump -u #{@user} -p#{@passwd} -h #{@server} "
cmd = "mysqldump -u #{@user} -p'#{@passwd}' -h #{@server} " +
"-P #{@port} #{@db_name} > #{bck_file}"
rc = system(cmd)

To call onedb successfully, I do not set the password in command line.


Associated revisions

Revision 91bb9315
Added by Carlos Martín over 7 years ago

Bug #2712: Fix shell characters for mysql commands in onedb. Thanks to Nicolas Belan for the patch.


#1 Updated by Carlos Martín over 7 years ago

  • Category set to CLI
  • Status changed from Pending to New
  • Assignee set to Carlos Martín
  • Target version set to Release 4.6

#2 Updated by Carlos Martín over 7 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Fixed, thank you!

Also available in: Atom PDF