President Barack Obama is weighing options for keeping some U.S. troops in Afghanistan longer than planned, while maintaining the goal of ending military operations by 2017, according to an administration official.