Subscribe
Accepted Solution

snapcreate archive log delete function error

[ Edited ]

Hi Gurus

I tried to configure archive log in snapcreator (at linux platform)  like the following:

ARCHIVE_LOG_ENABLE=Y

ARCHIVE_LOG_RETENTION=2

ARCHIVE_LOG_DIR=/tmp/log

ARCHIVE_LOG_EXT=lo

But meet error when do that.

######### Archive Log Management ##########
[Fri Jun 24 01:38:35 2011] ERROR:
mismatched tag at line 7, column 3, byte 249 at /</usr/local/scServer3.3.0/snapcreator>XML/Parser.pm line 187
<html>
        <head>
                <meta name="gwt:property" content="locale=es">
            <title>NetApp Snap Creator Framework</title>
                <link rel="shortcut icon" href="images/favicon.ico">
                <meta http-equiv="content-type" content="text/html;charset=utf-8" />
        </head>
        <body>
                <script>
                        var getCookie = function(c_name) {

                                if (document.cookie.length > 0) {
                                c_start = document.cookie.indexOf(c_name + "=");
                                if (c_start != -1) {
                                        c_start = c_start + c_name.length+1;
                                        c_end = document.cookie.indexOf(";", c_start);
                                        if (c_end == -1) c_end = document.cookie.length;
                                        return unescape(document.cookie.substring(c_start,c_end));
                                }
                                }

                                return "";

                        }

                        var locale = getCookie("locale");
                        if ( locale && locale != "en" ) {
                          document.write("<meta name='gwt:property' content='locale=" + locale + "' />");
                        } else {
                                document.write("<meta name='gwt:property' content='locale=" + 'en' + "' />");
                        }

                </script>

                <iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
                <script type="text/javascript" language="javascript" src="snapcreator/snapcreator.nocache.js"></script>
        </body>
</html> at /</usr/local/scServer3.3.0/snapcreator>SnapCreator/Agent/Remote.pm line 272

[Fri Jun 24 01:38:35 2011] ERROR: Archive Log Deletion failed, Exiting!

Would you please help to take a look?

BTW,  if under log directory, there are some sub-directories (not log file),  Could Archive log delete function work?

BR

TC

snapcreate archive log delete function error

The SC archive log plugin will not recursively delete archive logs. it only looks in directory or directory's you specify. in your case SC will delete any files older than 2 days which match *.lo in the /tmp/log directory. In order to delete files in multiple directory you can do following:

ARCHIVE_LOG_DIR01=/tmp/log/dir1

ARCHIVE_LOG_DIR02=/tmp/log/dir2

This would now delete logs in both directories

Let us know if this helps

Regards,

Keith

Re: snapcreate archive log delete function error

Thanks Keith.

If arch log directory like the following:

/tmp/log/20110620

/tmp/log/20110621

/tmp/log/20110622

/tmp/log/20110623

/tmp/log/20110624

The log files were stored into sub-directories by date and sub-dir are named by date too. Customer want delete all sub-dirs older than two days, is it possible?

BR

TC

在 2011-6-24,2:54,"Keith Tenzer" <xdl-communities@netapp.com> 写道:

Re: snapcreate archive log delete function error

created by Keith Tenzer in SnapCreator - View the full discussion

The SC archive log plugin will not recursively delete archive logs. it only looks in directory or directory's you specify. in your case SC will delete any files older than 2 days which match *.lo in the /tmp/log directory. In order to delete files in multiple directory you can do following:

ARCHIVE_LOG_DIR01=/tmp/log/dir1

ARCHIVE_LOG_DIR02=/tmp/log/dir2

This would now delete logs in both directories

Let us know if this helps

Regards,

Keith

  1. of replies to the post:

Discussion thread has 1 replies. Click here to read all the replies.

Original Post:

Hi Gurus I tried to configure archive log in snapcreator (at linux platform) like the following: ARCHIVE_LOG_ENABLE=Y ARCHIVE_LOG_RETENTION=2 ARCHIVE_LOG_DIR=/tmp/log ARCHIVE_LOG_EXT=lo But meet error when do that. ######### Archive Log Management ########## ERROR: mismatched tag at line 7, column 3, byte 249 at /XML/Parser.pm line 187 at /SnapCreator/Agent/Remote.pm line 272 ERROR: Archive Log Deletion failed, Exiting! Would you please help to take a look? BTW, if under log directory, there are some sub-directories (not log file), Could Archive log delete function work? BR TC

Reply to this message by replying to this email -or- go to the message on NetApp Community

Start a new discussion in SnapCreator by email or at NetApp Community

Stay Connected: Facebook Twitter LinkedIn YouTube Community

© 2011 NetApp | Privacy Policy | Unsubscribe | Contact Us

495 E. Java Drive, Sunnyvale, CA 94089 USA

Re: snapcreate archive log delete function error

Since directories are dynamic by date and SC does not recurse through directories I dont think this would be possible.

Regards,

Keith

Re: snapcreate archive log delete function error

Thank you very much. I will discuss with customer for that.

BTW, would You please help to check why I meet perl error when I run archive log delete function?

BR

TC

Re: snapcreate archive log delete function error

I will try and look into this but if you are getting such an error the best thing to do is open a support case since ngs can collect necessary info and work directly w/engineering by raising visibility to problem.

My guess is that since you are using agent, the user running agent may not have permissions. Another thing to check is run agent in debug mode and see if you get anymore info: snapcreator --start-agent --verbose --debug

I did already mention though that regardless of error what you are trying to do with archive log mgmt is not supported by SC so you may decide spending time trying to figure out error that wont help you for this particular case isnt worth it. We of course would like to investigate further w/NGS since this error has not yet been reported and could be a bug.

Hope this helps

Keith

Re: snapcreate archive log delete function error

Hi Keith

Thanks for your support.

Yes. I fixed the issue by fix agent issue.  In stead of to use Archive log Management function,  I add the following lines:

####################

### APP Commands ###

####################

ARCHIVE_CMD01=find /tmp/log -mtime +2 -print  | xargs  /bin/rm -rf

Do you think if it's workable?

BR

TC

Re: snapcreate archive log delete function error

Hi

I am always amazed and impressed that so many folks find other solutions with SC when things dont work out-of-the-box. This is a great idea, I didnt think about this at all but you are 100% correct, you can use ARCHIVE_CMDs to do your own custom archive log mgmt.

The one thing we continue to focus on with SC is to make sure it is simple and flexible, so if we develop something we make sure there is a way to interact manually with cmds or scripts and then we take direct feedback like this and improve built-in capabilities.

I am going to add this as a feature request for future SC release. So I capture the feature request is is as follow: Support archive log deletion recursively with sub directories?

I want to thank you for your time in helping us understand this issue, this will directly improve SC

Regards,

Keith

Re: snapcreate archive log delete function error

Hi Keith

Yes, the feature request is is : Support archive log deletion recursively with sub directories. I guess only one option for rm command could fix that. J

I love you guys. SC 3.3 is much easy and stable.

BR

TC

Re: snapcreate archive log delete function error

Thanks for the feedback, I will make sure this feature gets implemented, it is a bit tricky to add into built-in capabilities but we will work on it in a future release. We are 100% field driven and this is how things get added to releases...direct feedback from customers and partners.

Also be on lookout, SC 3.4.0 is comming really soon...lots of cool stuff

Regards,

Keith