You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by "Hugo Trippaers (JIRA)" <ji...@apache.org> on 2012/10/05 20:48:02 UTC
[jira] [Created] (CLOUDSTACK-268) cloud-setup-encryption dies with
a python exception
Hugo Trippaers created CLOUDSTACK-268:
-----------------------------------------
Summary: cloud-setup-encryption dies with a python exception
Key: CLOUDSTACK-268
URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
Project: CloudStack
Issue Type: Bug
Components: Install and Setup
Affects Versions: 4.1.0
Reporter: Hugo Trippaers
Assignee: Hugo Trippaers
Priority: Minor
> sudo cloud-setup-encryption
Preparing /etc/cloud/management/db.properties [ OK ]
Processing encryption ... Traceback (most recent call last):
File "/usr/bin/cloud-setup-encryption", line 266, in <module>
o.run()
File "/usr/bin/cloud-setup-encryption", line 255, in run
self.processEncryptionStuff()
File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
encryptDBPassword()
File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
return runCmd(cmd).strip('\n')
File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
raise Exception(stderr)
Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLOUDSTACK-268) cloud-setup-encryption dies
with a python exception
Posted by "Hugo Trippaers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLOUDSTACK-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471091#comment-13471091 ]
Hugo Trippaers commented on CLOUDSTACK-268:
-------------------------------------------
Good point, so the actual bug is that is does not detect that encryption is already setup. That warrants its own ticket, can you raise one? This
fix is still usefull for complex passwords I guess.
> cloud-setup-encryption dies with a python exception
> ---------------------------------------------------
>
> Key: CLOUDSTACK-268
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
> Project: CloudStack
> Issue Type: Bug
> Components: Install and Setup
> Affects Versions: 4.1.0
> Reporter: Hugo Trippaers
> Assignee: Hugo Trippaers
> Priority: Minor
> Fix For: 4.0.0
>
>
> > sudo cloud-setup-encryption
> Preparing /etc/cloud/management/db.properties [ OK ]
> Processing encryption ... Traceback (most recent call last):
> File "/usr/bin/cloud-setup-encryption", line 266, in <module>
> o.run()
> File "/usr/bin/cloud-setup-encryption", line 255, in run
> self.processEncryptionStuff()
> File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
> encryptDBPassword()
> File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
> self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
> File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
> return runCmd(cmd).strip('\n')
> File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
> raise Exception(stderr)
> Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
> /bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLOUDSTACK-268) cloud-setup-encryption dies
with a python exception
Posted by "Hugo Trippaers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLOUDSTACK-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470551#comment-13470551 ]
Hugo Trippaers commented on CLOUDSTACK-268:
-------------------------------------------
Proposed fix:
diff --git a/setup/bindir/cloud-setup-encryption.in b/setup/bindir/cloud-setup-encryption.in
index f2de2ec..35584b3 100755
--- a/setup/bindir/cloud-setup-encryption.in
+++ b/setup/bindir/cloud-setup-encryption.in
@@ -184,7 +184,7 @@ for example:
def processEncryptionStuff(self):
def encrypt(input):
- cmd = ['java','-classpath',self.encryptionJarPath,'org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI', 'encrypt.sh', 'input=%s'%input, 'password=%s'%self.mgmtsecretkey,'verbose=false']
+ cmd = ['java','-classpath',self.encryptionJarPath,'org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI', 'encrypt.sh', 'input=\'%s\''%input, 'password=%s'%self.mgmtsecretkey,'verbose=false']
return runCmd(cmd).strip('\n')
def saveMgmtServerSecretKey():
> cloud-setup-encryption dies with a python exception
> ---------------------------------------------------
>
> Key: CLOUDSTACK-268
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
> Project: CloudStack
> Issue Type: Bug
> Components: Install and Setup
> Affects Versions: 4.1.0
> Reporter: Hugo Trippaers
> Assignee: Hugo Trippaers
> Priority: Minor
>
> > sudo cloud-setup-encryption
> Preparing /etc/cloud/management/db.properties [ OK ]
> Processing encryption ... Traceback (most recent call last):
> File "/usr/bin/cloud-setup-encryption", line 266, in <module>
> o.run()
> File "/usr/bin/cloud-setup-encryption", line 255, in run
> self.processEncryptionStuff()
> File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
> encryptDBPassword()
> File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
> self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
> File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
> return runCmd(cmd).strip('\n')
> File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
> raise Exception(stderr)
> Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
> /bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLOUDSTACK-268) cloud-setup-encryption dies
with a python exception
Posted by "Kishan Kavala (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLOUDSTACK-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470951#comment-13470951 ]
Kishan Kavala commented on CLOUDSTACK-268:
------------------------------------------
Why is the script trying to encrypt an already encrypted password?
input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H)
Escaping special character is a work around.
> cloud-setup-encryption dies with a python exception
> ---------------------------------------------------
>
> Key: CLOUDSTACK-268
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
> Project: CloudStack
> Issue Type: Bug
> Components: Install and Setup
> Affects Versions: 4.1.0
> Reporter: Hugo Trippaers
> Assignee: Hugo Trippaers
> Priority: Minor
> Fix For: 4.0.0
>
>
> > sudo cloud-setup-encryption
> Preparing /etc/cloud/management/db.properties [ OK ]
> Processing encryption ... Traceback (most recent call last):
> File "/usr/bin/cloud-setup-encryption", line 266, in <module>
> o.run()
> File "/usr/bin/cloud-setup-encryption", line 255, in run
> self.processEncryptionStuff()
> File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
> encryptDBPassword()
> File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
> self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
> File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
> return runCmd(cmd).strip('\n')
> File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
> raise Exception(stderr)
> Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
> /bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLOUDSTACK-268) cloud-setup-encryption dies
with a python exception
Posted by "frank zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLOUDSTACK-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470580#comment-13470580 ]
frank zhang commented on CLOUDSTACK-268:
----------------------------------------
Thanks Hugo. I think your fix is right as we should escape special char from shell
> cloud-setup-encryption dies with a python exception
> ---------------------------------------------------
>
> Key: CLOUDSTACK-268
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
> Project: CloudStack
> Issue Type: Bug
> Components: Install and Setup
> Affects Versions: 4.1.0
> Reporter: Hugo Trippaers
> Assignee: Hugo Trippaers
> Priority: Minor
>
> > sudo cloud-setup-encryption
> Preparing /etc/cloud/management/db.properties [ OK ]
> Processing encryption ... Traceback (most recent call last):
> File "/usr/bin/cloud-setup-encryption", line 266, in <module>
> o.run()
> File "/usr/bin/cloud-setup-encryption", line 255, in run
> self.processEncryptionStuff()
> File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
> encryptDBPassword()
> File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
> self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
> File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
> return runCmd(cmd).strip('\n')
> File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
> raise Exception(stderr)
> Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
> /bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CLOUDSTACK-268) cloud-setup-encryption dies
with a python exception
Posted by "Hugo Trippaers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLOUDSTACK-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13470558#comment-13470558 ]
Hugo Trippaers commented on CLOUDSTACK-268:
-------------------------------------------
The only reference to this script in the code is here:
./server/src/com/cloud/upgrade/dao/Upgrade2214to30.java: throw new CloudRuntimeException("Encryption is not enabled. Please Run cloud-setup-encryption to enable encryption");
> cloud-setup-encryption dies with a python exception
> ---------------------------------------------------
>
> Key: CLOUDSTACK-268
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
> Project: CloudStack
> Issue Type: Bug
> Components: Install and Setup
> Affects Versions: 4.1.0
> Reporter: Hugo Trippaers
> Assignee: Hugo Trippaers
> Priority: Minor
>
> > sudo cloud-setup-encryption
> Preparing /etc/cloud/management/db.properties [ OK ]
> Processing encryption ... Traceback (most recent call last):
> File "/usr/bin/cloud-setup-encryption", line 266, in <module>
> o.run()
> File "/usr/bin/cloud-setup-encryption", line 255, in run
> self.processEncryptionStuff()
> File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
> encryptDBPassword()
> File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
> self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
> File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
> return runCmd(cmd).strip('\n')
> File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
> raise Exception(stderr)
> Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
> /bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CLOUDSTACK-268) cloud-setup-encryption dies with
a python exception
Posted by "Hugo Trippaers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CLOUDSTACK-268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hugo Trippaers resolved CLOUDSTACK-268.
---------------------------------------
Resolution: Fixed
Fix Version/s: 4.0.0
Fix committed to master and 4.0
> cloud-setup-encryption dies with a python exception
> ---------------------------------------------------
>
> Key: CLOUDSTACK-268
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-268
> Project: CloudStack
> Issue Type: Bug
> Components: Install and Setup
> Affects Versions: 4.1.0
> Reporter: Hugo Trippaers
> Assignee: Hugo Trippaers
> Priority: Minor
> Fix For: 4.0.0
>
>
> > sudo cloud-setup-encryption
> Preparing /etc/cloud/management/db.properties [ OK ]
> Processing encryption ... Traceback (most recent call last):
> File "/usr/bin/cloud-setup-encryption", line 266, in <module>
> o.run()
> File "/usr/bin/cloud-setup-encryption", line 255, in run
> self.processEncryptionStuff()
> File "/usr/bin/cloud-setup-encryption", line 215, in processEncryptionStuff
> encryptDBPassword()
> File "/usr/bin/cloud-setup-encryption", line 204, in encryptDBPassword
> self.putDbProperty('db.cloud.password', formatEncryptResult(encrypt(dbPasswo rd)))
> File "/usr/bin/cloud-setup-encryption", line 188, in encrypt
> return runCmd(cmd).strip('\n')
> File "/usr/bin/cloud-setup-encryption", line 51, in runCmd
> raise Exception(stderr)
> Exception: /bin/sh: -c: line 0: syntax error near unexpected token `('
> /bin/sh: -c: line 0: `java -classpath /usr/share/java/cloud-jasypt-1.8.jar org.j asypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh input=ENC(nuxRTKA9hSfV1y5 pJGYV4vYShq8QyT5H) password=password verbose=false'
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira