Hi Chi,



The python script cannot be executed in this way.




You can add add a test fw/lb/pf rule or enable nat, to test it







-Wei








At 2025-07-13 22:59:52, "Chi vediamo" <tatay...@gmail.com> wrote:
>Hello Wei, I just got the opportunity to test is not working:
>
>If i try to run the  CsAddress.py script alone I got an error from . import 
>CsHelper, even without adding the lines
>
># python3 /opt/cloud/bin/cs/CsAddress.py
>Traceback (most recent call last):
>  File "/opt/cloud/bin/cs/CsAddress.py", line 23, in <module>
>    from . import CsHelper
>
>And the static routes are not added.
>
>
>Tata Y.
>
>> On Jun 16, 2025, at 11:48 AM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
>> 
>> maybe better to add after line 375
>> 
>> if self.dev == "eth2":
>>    route.set_route("10.x.x.x/30 via x.y.z.1 dev eth2")
>> 
>> -Wei
>> 
>> On Mon, Jun 16, 2025 at 5:23 PM Chi vediamo <tatay...@gmail.com> wrote:
>> 
>>> Hello Wei,
>>> 
>>> I am going to test this now, Will you recommend
>>> 
>>> after the :  def post_configure(self, address): line 337 ?
>>> or after the  the whole definition like line 375
>>> 
>>> Thank you again.
>>> 
>>> Tata Y.
>>> 
>>> 
>>>> On Jun 16, 2025, at 10:43 AM, Wei ZHOU <ustcweiz...@gmail.com> wrote:
>>>> 
>>>> sorry I thought you want to add iptables rules
>>>> :facepalm
>>>> 
>>>> 
>>>> If you want to add a route, you can add a line to CsAddress.py
>>>> 
>>> https://github.com/apache/cloudstack/blob/main/systemvm/debian/opt/cloud/bin/cs/CsAddress.py#L710C9-L710C27
>>>> for example
>>>> route.set_route("10.x.x.x/30 via x.y.z.1 dev eth2")
>>>> 
>>>> 
>>>> -Wei
>>>> 
>>>> 
>>>> 
>>>> 

Reply via email to