Forum Discussion

samstep's avatar
samstep
Icon for Cirrocumulus rankCirrocumulus
Aug 07, 2008

ASMPolicy.download_policy not working

Has anoyone ever tried / tested download_policy method in ASM iControl? I am trying to download a policy and getting an error "Error opening file for read operations". The policy definitely exists and is named correctly in the ASMPolicy.download_policy call, yet the box (BIG-IP version 9.4.5) is still throwing the above error.

 

 

Code sample:

 

   
   iControl.Interfaces my_interface = new iControl.Interfaces();  
   my_interface.initialize(Hostname, Username, Password);                 
      
   long chunk_size = (64 * 1024); //64kb chunks   
   long file_offset = 0;   
   string policy_name = "my_policy";   
      
   iControl.ASMFileTransferContext ctx;   
      
   ctx = my_interface.ASMPolicy.download_policy(policy_name, chunk_size, ref file_offset);    
   

 

 

Getting Error:

 

 

                
   Exception caught in ASM::urn:iControl:ASM/Policy::download_policy()   
   Exception: Common : OperationFailed   
   primary_error_code   : 16908289 (0x01020001)   
   secondary_error_code : 0   
   error_string         : Error opening file for read operations   
   

 

3 Replies

  • The server code for this method attempts to open the file "/var/tmp/my_name". Can you look on your filesystem for the "my_policy" file?

     

     

    -Joe
  • Joe, there is nothing in /var/tmp (apart from some old sesssion_XYZ files)

     

     

     

     

     

  • I don't think an ASM policy is ever written to /var/tmp/ during normal use. In 9.4.2+ the ASM snapshot is a zipped tar archive which contains the policies. That file is written to /var/tmp.

     

     

    Sam, did you end up opening a case with Support?

     

     

    Aaron