GutoVeronezi commented on a change in pull request #5839:
URL: https://github.com/apache/cloudstack/pull/5839#discussion_r780450416



##########
File path: server/src/main/java/com/cloud/network/rules/RulesManagerImpl.java
##########
@@ -629,8 +630,14 @@ private boolean enableStaticNat(long ipId, long vmId, long 
networkId, boolean is
         return false;
     }
 
-    protected void applyUserData(long vmId, Network network, Nic guestNic) 
throws ResourceUnavailableException {
-        UserDataServiceProvider element = 
_networkModel.getUserDataUpdateProvider(network);
+    protected void applyUserDataIfNeeded(long vmId, Network network, Nic 
guestNic) throws ResourceUnavailableException {
+        UserDataServiceProvider element = null;
+        try {
+            element = _networkModel.getUserDataUpdateProvider(network);
+        } catch (UnsupportedServiceException ex) {
+            s_logger.info(String.format("%s is not supported by network %s, 
skipping", Service.UserData.getName(), network));

Review comment:
       ```suggestion
               s_logger.info(String.format("%s is not supported by network %s, 
skipping.", Service.UserData.getName(), network));
   ```




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