weizhouapache opened a new issue, #7299:
URL: https://github.com/apache/cloudstack/issues/7299

   The passphrase of encrypted volumes is supposed to be encrypted.
   
   
![image](https://user-images.githubusercontent.com/57355700/222204248-05d79a3d-b661-4229-8fb7-6f6a60a65e7c.png)
   
https://github.com/apache/cloudstack/blob/main/engine/schema/src/main/java/org/apache/cloudstack/secret/PassphraseVO.java
   
   However, it is not encrypted actually.
   
   
![image](https://user-images.githubusercontent.com/57355700/222204355-089cc0d7-4d3e-4a25-ab1e-e2cfaecb345b.png)
   
   In the database migration, an exception is thrown
   ```
   # cloudstack-migrate-databases -m password -d password -e password -f
   Started database migration at Wed Mar 01 16:27:37 UTC 2023
   ...
   Begin migrate table passphrase field passphrase 
   Error during data migration
   Data Migration failed. Reverting db.properties
   Got error during database migration at Wed Mar 01 16:27:46 UTC 2023
   Failed to migrate databases. You may find more logs in 
/tmp/cloudstack-migrate-databases.log
   
   # cat /tmp/cloudstack-migrate-databases.log
   ...
   Begin migrate table passphrase field passphrase 
   com.cloud.utils.exception.CloudRuntimeException: Error decrypting value: 
E3M9J*****
        at 
com.cloud.utils.crypt.CloudStackEncryptor.decrypt(CloudStackEncryptor.java:93)
        at 
com.cloud.utils.crypt.EncryptionSecretKeyChanger.migrateValue(EncryptionSecretKeyChanger.java:504)
        at 
com.cloud.utils.crypt.EncryptionSecretKeyChanger.migrateValueAndUpdateDatabaseById(EncryptionSecretKeyChanger.java:546)
   ...
   ```
   
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on main 
branch.
   -->
   
   ~~~
   4.18.0.0-RC2
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   
   
   ##### OS / ENVIRONMENT
   <!--
   Information about the environment if relevant, N/A otherwise
   -->
   
   rocky8
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   <!-- Paste example playbooks or commands between quotes below -->
   ~~~
   
   ~~~
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   ~~~
   
   ~~~
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   <!-- Paste verbatim command output between quotes below -->
   ~~~
   
   ~~~
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to