automatic removal of shadow directory files

Unanswered Question
Mar 13th, 2007
User Badges:

I am currently running LMS 2.5.1 with plans to migrate to 2.6 soon. I have been having problems related to the fact the deleting a device in the database doesn't remove the corresponding configuration file in the shadow directory. I'm hoping that happens automatically in 2.6. Does that happen? If not, is there some way I can make it happen?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Joe Clarke Tue, 03/13/2007 - 12:35
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Yes and no. Shadow entries are not immediately purged when a device is deleted. However, every time ConfigMgmtServer is restarted, stale entries will be cleaned up. This should be happening even in LMS 2.5.1.

mgottfried Tue, 03/13/2007 - 12:46
User Badges:

Does that mean that the shadow directory files for any device that has been removed from the database will be removed as part of the clean up?

Joe Clarke Tue, 03/13/2007 - 12:48
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

Yes. If you pdterm then pdexec ConfigMgmtServer, any device that is no longer managed by RME will have its shadow directory entries deleted from the file system.

mgottfried Tue, 03/13/2007 - 13:01
User Badges:

Thanks that is good news. I have one more question though. That sounds like commands run in a command window. Correct? Can those be scheduled to happen periodically so you regularly get a clean shadow directory?

Joe Clarke Tue, 03/13/2007 - 13:04
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

The commands can be scheduled, but this is not something you really want to run that often. Restarting the ConfigMgmtServer will interrupt any config polling or collection operations (basically anything having to do with config archive). If you're sure the server is otherwise idle, you can periodically restart ConfigMgmtServer using cron or at.

mgottfried Thu, 03/15/2007 - 09:58
User Badges:

We did a test before trying to run anything in cron or as an at job. Unfortunately, it didn't work. The devices that were removed still have config files in the shadow directory. Do you have any suggestions on what might be wrong or what we can do to make this work?

Joe Clarke Thu, 03/15/2007 - 10:00
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

What version of RME do you have? It definitely works in RME 4.0.5, but I have not tested the previous versions. The code is there, but there may be bugs.

mgottfried Thu, 03/15/2007 - 10:49
User Badges:

The RME version is 4.0.5. What do you think could be going wrong?

mgottfried Fri, 03/16/2007 - 10:21
User Badges:

I just learned that the servers in question are running RME 4.0.4. Mine is different. So, is there something else we might need to do on servers running 4.0.4?

Joe Clarke Fri, 03/16/2007 - 10:29
User Badges:
  • Cisco Employee,
  • Hall of Fame,

    Founding Member

I've reviewed the code, and there was a bug prior to LMS 2.6 (i.e. RME 4.0.5) that prevented this from working. You will need to upgrade to get working shadow directory cleaning.

Actions

This Discussion