Github user jburwell commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1470#discussion_r59294795 --- Diff: core/src/com/cloud/agent/resource/virtualnetwork/facade/AbstractConfigItemFacade.java --- @@ -104,13 +109,25 @@ public static AbstractConfigItemFacade getInstance(final Class<? extends Network return instance; } + + private static String appendUuidToJsonFiles(final String filename) { + String remoteFileName = new String(filename); + if (remoteFileName.endsWith("json")) { + remoteFileName += "." + UUID.randomUUID().toString(); + } + return remoteFileName; + } + protected List<ConfigItem> generateConfigItems(final ConfigBase configuration) { final List<ConfigItem> cfg = new LinkedList<>(); - final ConfigItem configFile = new FileConfigItem(VRScripts.CONFIG_PERSIST_LOCATION, destinationFile, gson.toJson(configuration)); + final String remoteFilename = appendUuidToJsonFiles(destinationFile); + s_logger.debug("Transformed filename " + destinationFile + " to " + remoteFilename); --- End diff -- Please wrap in a ``if (s_logger.isDebugEnabled())`` block to avoid unnecessary string creation due to pre-method string concatenation when ``DEBUG`` is not enabled.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---