weizhouapache commented on PR #8791:
URL: https://github.com/apache/cloudstack/pull/8791#issuecomment-1998055575

   > @weizhouapache sorry I didn't quite understand why the gzip in between. 
   
   refer to 
https://cloudinit.readthedocs.io/en/latest/explanation/format.html#gzip-compressed-content
   
   Gzip compressed content
   Content found to be gzip compressed will be uncompressed. The uncompressed 
data will then be used as if it were not compressed. This is typically useful 
because user data is limited to ~16384 
[[1]](https://cloudinit.readthedocs.io/en/latest/explanation/format.html#id4) 
bytes.
   
   > Because without it i.e., `echo "Apache CloudStack" | base64 -w0` if this 
is provided as input to the userdata param, we don't see the issue. That said, 
don't mind adding the checkbox. But I see an issue with decoding it when 
viewing it in the details view... since its is a gzip encoded string, it 
attempts to decode it and it would appear as:
   > 
   > 
![image](https://private-user-images.githubusercontent.com/10495417/312940397-6f8d2d8a-111c-4210-9ae3-23d4ba54a028.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTA0Mzk4NzUsIm5iZiI6MTcxMDQzOTU3NSwicGF0aCI6Ii8xMDQ5NTQxNy8zMTI5NDAzOTctNmY4ZDJkOGEtMTExYy00MjEwLTlhZTMtMjNkNGJhNTRhMDI4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzE0VDE4MDYxNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjM2FiOTYxNDk2ZTEwMmFhZWM5YjEwNWVhM2I2OGZiMjE3MzU4N2VkMzU2OGY0ZjRkYWE5OTJiZjgzM2IzZWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Bxt7zHUYvVZ48HXzqHAUvht6SY40mJifP6ZRbXs1ilM)
   
   I think it is OK as the userdata is binary.
   
   moreover, if an user input a base64-encoded string on UI, we do not know if 
the user wants the string to be the userdata, or decode it as userdata, it 
would be good to ask the user to tell us.


-- 
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