VirtualEngine / XenDesktop7

Community Citrix XenDesktop 7 DSC resources
MIT License
22 stars 20 forks source link

Optimal Gateway Routing Resource Farm Property problem #55

Closed shaun-avenell closed 11 months ago

shaun-avenell commented 11 months ago

In Visual Code the ‘Farm’ property in configuration was showing error as not valid

                XD7StoreFrontOptimalGateway "AddOptimalGatewayRoute$Storenumber$OGRNumber"
                {

                        GatewayName = $OptimalGWRoute.OGRGatewayName
                        ResourcesVirtualPath = $StoreFrontConfig.VirtualPathRoot + $StoreName
                        Hostnames = $OptimalGWRoute.OGRHostnames
                        StaUrls = $OptimalGWRoute.OGRGatewayNameStaUrls
                        StasUseLoadBalancing = $OptimalGWRoute.OGRGatewayNameStasUseLoadBalancing
                        StasBypassDuration = $OptimalGWRoute.OGRGatewayNameStasBypassDuration
                        Zones = $OptimalGWRoute.OGRZones
                        Farms = $OptimalGWRoute.OGRFarms         ###This was flagged as invalid property
                        Ensure = 'Present'
                        DependsOn = "[XD7StoreFrontWebReceiverPluginAssistant]SFConfigRcvrPlugin$StoreNumber"
                }
            }

The mof file “VE_XD7StoreFrontOptimalGateway.schema.mof” from within the Xendesktop7 module, was showing the Farm parameter as Read Only, all others were Write.

I updated the file as below to switch Farms property from Read to Write , which then fixed the problem. This property is certainly writeable via the Citrix Powershell SDK so I think this is valid.

[ClassVersion("1.0.0.0"), FriendlyName("XD7StoreFrontOptimalGateway")] class VE_XD7StoreFrontOptimalGateway : OMI_BaseResource { [Key, Description("StoreFront gateway name")] String GatewayName; [Write, Description("Site Id")] UInt64 SiteId; [Required, Description("Resources Virtual Path")] String ResourcesVirtualPath; [Required, Description("Hostnames")] String Hostnames[]; [Required, Description("Secure Ticket Authority server Urls")] String StaUrls[]; [Write, Description("Load balance between the configured STA servers")] Boolean StasUseLoadBalancing; [Write, Description("Time before retrying a failed STA server")] String StasBypassDuration; [Write, Description("Enable session reliability")] Boolean EnableSessionReliability; [Write, Description("Request STA tickets from two STA servers")] Boolean UseTwoTickets; [Write, Description("Farms")] String Farms[]; ##changed from Read to Write [Write, Description("Zones")] String Zones[]; [Write, Description("Enabled On Direct Access")] Boolean EnabledOnDirectAccess; [Write, Description("Ensure"), ValueMap{"Present","Absent"}, Values{"Present","Absent"}] String Ensure; };

iainbrighton commented 11 months ago

@shaun-avenell The change has been published to the PSGallery, but I have no way to confirm whether it's fixed.

shaun-avenell commented 11 months ago

Many thanks Ian, I have made the change locally and it does work.

Regards

Shaun

From: Iain Brighton @.> Sent: Wednesday, November 1, 2023 11:49 AM To: VirtualEngine/XenDesktop7 @.> Cc: Avenell, Shaun @.>; Mention @.> Subject: Re: [VirtualEngine/XenDesktop7] Optimal Gateway Routing Resource Farm Property problem (Issue #55)

@shaun-avenellhttps://github.com/shaun-avenell The change has been published to the PSGallery, but I have no way to confirm whether it's fixed.

— Reply to this email directly, view it on GitHubhttps://github.com/VirtualEngine/XenDesktop7/issues/55#issuecomment-1788823579, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BDKXI3JIVQAFYVTWNLDRD43YCIZKHAVCNFSM6AAAAAA6DRIECOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBYHAZDGNJXHE. You are receiving this because you were mentioned.Message ID: @.***>

Unless otherwise stated, this email has been sent from Fujitsu Services Limited (registered in England No 96056); Fujitsu EMEA PLC (registered in England No 2216100) both with registered offices at: Lovelace Road, Bracknell, Berkshire RG12 8SN; PFU (EMEA) Limited, (registered in England No 1578652) registered offices at: Belmont, Belmont Road, Uxbridge, England, UB8 1HE and Fujitsu Research of Europe Ltd (registered in England No. 4153469) 4th Floor, Building 3, Hyde Park Hayes, 11 Millington Road, Hayes, UB3 4AZ.

This email is only for the use of its intended recipient. Its contents are subject to a duty of confidence and may be privileged. Fujitsu does not guarantee that this email has not been intercepted and amended or that it is virus-free.